3

这是我第一次使用 Rails 5。我正在尝试运行;rails s,它给了我这个:

$ rails s
=> Booting Puma
=> Rails 5.0.0.beta2 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. Use before_action instead. (called from block in tsort_each at /Users/ericcarpentier/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:226)
DEPRECATION WARNING: after_filter is deprecated and will be removed in Rails 5.1. Use after_action instead. (called from block in tsort_each at /Users/ericcarpentier/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:226)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in tsort_each at /Users/ericcarpentier/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:226)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in tsort_each at /Users/ericcarpentier/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/tsort.rb:226)
Exiting
/Users/ericcarpentier/.rvm/gems/ruby-2.2.2/gems/activesupport-5.0.0.beta2/lib/active_support/logger_silence.rb:23:in `level': undefined method `[]' for nil:NilClass (NoMethodError)
  from /Users/ericcarpentier/.rvm/gems/ruby-2.2.2/gems/railties-5.0.0.beta2/lib/rails/commands/server.rb:140:in `log_to_stdout'
  from /Users/ericcarpentier/.rvm/gems/ruby-2.2.2/gems/railties-5.0.0.beta2/lib/rails/commands/server.rb:76:in `start'
  from /Users/ericcarpentier/.rvm/gems/ruby-2.2.2/gems/railties-5.0.0.beta2/lib/rails/commands/commands_tasks.rb:90:in `block in server'
  from /Users/ericcarpentier/.rvm/gems/ruby-2.2.2/gems/railties-5.0.0.beta2/lib/rails/commands/commands_tasks.rb:85:in `tap'
  from /Users/ericcarpentier/.rvm/gems/ruby-2.2.2/gems/railties-5.0.0.beta2/lib/rails/commands/commands_tasks.rb:85:in `server'
  from /Users/ericcarpentier/.rvm/gems/ruby-2.2.2/gems/railties-5.0.0.beta2/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
  from /Users/ericcarpentier/.rvm/gems/ruby-2.2.2/gems/railties-5.0.0.beta2/lib/rails/command.rb:20:in /`run'
  from /Users/ericcarpentier/.rvm/gems/ruby-2.2.2/gems/railties-5.0.0.beta2/lib/rails/commands.rb:19:in `<top (required)>'
  from bin/rails:9:in `require'
  from bin/rails:9:in `<main>'
4

1 回答 1

4

在我的 Gemfile 中,我有:

gem 'rails_12factor'

我得到了同样的错误

我将 Gemfile 更改为:

group :production, :staging do
    gem 'rails_12factor'
end

捆绑安装,它现在可以工作了。试试看

于 2016-02-12T22:49:01.803 回答