我在运行时遇到了一些问题bundle exec rake db:migrate
。终端打印出以下内容:
[RailsAdmin] RailsAdmin initialization disabled by default. Pass SKIP_RAILS_ADMIN_INITIALIZER=false if you need it.
rake aborted!
Failed to connect to a master node at 127.0.0.1:9100
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo-1.6.4/lib/mongo/connection.rb:420:in `connect'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo-1.6.4/lib/mongo/connection.rb:594:in `setup'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo-1.6.4/lib/mongo/connection.rb:130:in `initialize'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo_mapper-0.12.0/lib/mongo_mapper/connection.rb:79:in `new'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo_mapper-0.12.0/lib/mongo_mapper/connection.rb:79:in `connect'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo_mapper-0.12.0/lib/mongo_mapper/connection.rb:89:in `setup'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo_mapper-0.12.0/lib/mongo_mapper/railtie.rb:28:in `block in <class:Railtie>'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `instance_exec'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `run_initializers'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.11/lib/rails/application.rb:136:in `initialize!'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/User/app/config/environment.rb:5:in `<top (required)>'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
/Users/User.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.11/lib/rails/application.rb:103:in `require_environment!'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/railties-3.2.11/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in `eval'
/Users/User/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
澄清一下:在运行 bundle exec rake db:migrate 之前,我做了 bundle install ,一切正常。任何人?