2

最近、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 のリロード、クリア、修復を試みましたが、同じエラーが発生し続けます。私はそれを修正するためにいくつかの助けをお願いします.

前もって感謝します :)

4

2 に答える 2

0

でRVMを削除することで解決

rvm implode

rvm Web サイト ( https://rvm.io/ ) のコマンドで再インストールする前に。

于 2013-05-08T10:45:26.577 に答える