gpt4 book ai didi

ruby-on-rails - 更新到 4.0.0.rc1 后 rails 出错

转载 作者:数据小太阳 更新时间:2023-10-29 08:49:39 26 4
gpt4 key购买 nike

最近我更新到 rails 4.0.0.rc1 并且遇到了一些错误。我目前也在使用 RVM。创建 Rails 4 应用程序并运行“rails s”或“rspec rails”后,出现错误 -

/Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/common.rb:67:in `initialize': no implicit conversion of nil into Hash (TypeError)
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/common.rb:67:in `new'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/common.rb:67:in `generator='
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/ext.rb:17:in `<module:Ext>'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/ext.rb:12:in `<module:JSON>'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json/ext.rb:9:in `<top (required)>'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json.rb:58:in `require'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json.rb:58:in `<module:JSON>'
from /Users/metaHunts/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/gems/2.0.0/gems/json-1.7.7/lib/json.rb:54:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/object/to_json.rb:3:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/object/to_json.rb:3:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/object.rb:11:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activesupport-4.0.0.rc1/lib/active_support/core_ext/object.rb:11:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/configuration.rb:3:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/configuration.rb:3:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/railtie.rb:2:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/railtie.rb:2:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/engine.rb:1:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/engine.rb:1:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/application.rb:4:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/application.rb:4:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails.rb:9:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails.rb:9:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.rc1/lib/active_record/railtie.rb:2:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.rc1/lib/active_record/railtie.rb:2:in `<top (required)>'
from /Users/metaHunts/Desktop/TeenStarter/config/application.rb:4:in `require'
from /Users/metaHunts/Desktop/TeenStarter/config/application.rb:4:in `<top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `require'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `block in <top (required)>'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `tap'
from /Users/metaHunts/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

我已经尝试重新加载 rvm、清理和修复它,但我总是遇到同样的错误。我能帮忙修一下吗?

提前致谢:)

最佳答案

遇到了同样的问题。出于某种原因,我不知道它通过运行得到修复:

gem install json -v 1.7.7

关于ruby-on-rails - 更新到 4.0.0.rc1 后 rails 出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16384156/

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