アプリを 3.2 から Rails 4 にアップグレードしようとしています。現時点ではすべての宝石の競合が解決されたと思いますが、後で再び発生する可能性があることはわかっています。
「exec rails sをバンドル」してブラウザでアプリを開こうとすると、アプリのホームインデックスに移動すると、次のエラーが表示されます。
IOError (読み取り用に開かれていません)
誰でもこれを手伝ってもらえますか?どうもありがとう。
ここに私が使用した宝石リストがあります:
gem 'rails', '4.0.1'
gem 'sass-rails', '~> 4.0.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'jquery-rails'
gem 'jbuilder', '~> 1.2'
# add these gems to help with the transition:
gem 'protected_attributes'
gem 'rails-observers'
gem 'actionpack-page_caching'
gem 'actionpack-action_caching'
gem "activerecord-session_store"
コンソールのログメッセージは次のとおりです。
Started GET "/" for 127.0.0.1 at 2013-11-06 20:16:27 +1100
Processing by HomeController#index as HTML
PCategory Load (0.5ms) SELECT "p_categories".* FROM "p_categories"
Rendered home/index.html.erb within layouts/application (4.1ms)
Completed 500 Internal Server Error in 15ms
IOError (not opened for reading):
activesupport (4.0.1) lib/active_support/json/encoding.rb:256:in `each'
activesupport (4.0.1) lib/active_support/json/encoding.rb:256:in `to_a'
activesupport (4.0.1) lib/active_support/json/encoding.rb:256:in `as_json'
activesupport (4.0.1) lib/active_support/json/encoding.rb:58:in `block in as_json'
activesupport (4.0.1) lib/active_support/json/encoding.rb:81:in 'check_for_circular_references'
activesupport (4.0.1) lib/active_support/json/encoding.rb:57:in `as_json'
activesupport (4.0.1) lib/active_support/json/encoding.rb:296:in `block in as_json'
activesupport (4.0.1) lib/active_support/json/encoding.rb:296:in `each'
activesupport (4.0.1) lib/active_support/json/encoding.rb:296:in `map'
activesupport (4.0.1) lib/active_support/json/encoding.rb:296:in `as_json'
activesupport (4.0.1) lib/active_support/json/encoding.rb:58:in `block in as_json'
activesupport (4.0.1) lib/active_support/json/encoding.rb:81:in g`check_for_circular_references'
activesupport (4.0.1) lib/active_support/json/encoding.rb:57:in `as_json'
activesupport (4.0.1) lib/active_support/json/encoding.rb:296:in `block in as_json'
activesupport (4.0.1) lib/active_support/json/encoding.rb:296:in `each'
activesupport (4.0.1) lib/active_support/json/encoding.rb:296:in `map'
activesupport (4.0.1) lib/active_support/json/encoding.rb:296:in `as_json'
activesupport (4.0.1) lib/active_support/json/encoding.rb:50:in `block in encode'
activesupport (4.0.1) lib/active_support/json/encoding.rb:81:in `check_for_circular_references'
activesupport (4.0.1) lib/active_support/json/encoding.rb:49:in `encode'
activesupport (4.0.1) lib/active_support/json/encoding.rb:306:in `block in encode_json'
activesupport (4.0.1) lib/active_support/json/encoding.rb:306:in `each'
activesupport (4.0.1) lib/active_support/json/encoding.rb:306:in `map'