我使用的是rails 4.1,但是当我尝试在终端上运行'rails s'时,它给出了这个错误:
Exiting
/home/ben/.rvm/gems/ruby-2.0.0-p247@addtocartalerts/gems/railties-4.0.4/lib/rails/commands/server.rb:78:in `start': undefined method `formatter' for nil:NilClass (NoMethodError)
from /home/ben/.rvm/gems/ruby-2.0.0-p247@addtocartalerts/gems/railties-4.0.4/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/ben/.rvm/gems/ruby-2.0.0-p247@addtocartalerts/gems/railties-4.0.4/lib/rails/commands.rb:71:in `tap'
from /home/ben/.rvm/gems/ruby-2.0.0-p247@addtocartalerts/gems/railties-4.0.4/lib/rails/commands.rb:71:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
请帮
您没有使用rails 4.1。看看铁路的宝石小径。上面写着railties 4.0.4
检查Gemfile版本是否正确。执行bundle update rails
。如果您安装了多个rails gem,则使用binstub或bundle exec rails s