gpt4 book ai didi

ruby-on-rails - 第一次使用 Rails 5,tsort_each 有问题

转载 作者:行者123 更新时间:2023-12-01 12:29:54 25 4
gpt4 key购买 nike

这是我第一次使用 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>'

最佳答案

在我的 Gemfile 中,我有:

gem 'rails_12factor'

我遇到了同样的错误

我将 Gemfile 更改为:

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

捆绑安装,现在可以使用了。试试吧

关于ruby-on-rails - 第一次使用 Rails 5,tsort_each 有问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35280048/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com