我最近在Debian 7.7上新建了一个 Meteor (1.2.1) 项目,但是我无法进入Mongo终端:
$ meteor create test
$ cd test
$ meteor run
[[[[[ ~/test ]]]]]
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
在新的终端中:
$ meteor mongo
mongo: Meteor isn't running a local MongoDB server.
This command only works while Meteor is running your application locally.
Start your application first with 'meteor' and then run this
command in a new terminal. This error will also occur if you asked Meteor to
use a different MongoDB server with $MONGO_URL when you ran your
application.
If you're trying to connect to the database of an app you deployed with
'meteor deploy', specify your site's name as an argument to this
command.
是的,它正在运行本地MongoDB服务器!出了什么问题?我该怎么办?
顺便说一下,$MONGO_URL
是空的。MongoDB已安装,但未使用(只需要mongodump和mongorestore连接到Meteor的mongo)。
谢谢。
meteor mongo
之前停止了meteor run
命令(例如Cmd-C
)?如果是这样的话,是不起作用的,因为此时meteor没有在运行。您需要在meteor run
仍在执行时,在新的终端中运行meteor mongo
。 否则,请检查echo $MONGO_URL
显示了什么。 - JeremyKmeteor create --example todos
。 - JeremyKmeteor mongo
命令却不能正常工作。 - quape