問題
railsのサーバを立ち上げ、そのサーバのアドレス(http://localhost:3000)にアクセスするとブラウザ上にエラーが表示。
コマンドライン上には以下のエラーが表示されました。
DEPRECATION WARNING: You didn't set config.secret_key_base. Read the upgrade documentation to learn more about this new config option. (called from service at /usr/lib/ruby/1.9.1/webrick/httpserver.rb:138)
[2014-12-18 13:15:07] ERROR RuntimeError: You must set config.secret_key_base in your app's config.
/var/lib/gems/1.9.1/gems/railties-4.0.5/lib/rails/application.rb:145:in `env_config'
/var/lib/gems/1.9.1/gems/railties-4.0.5/lib/rails/engine.rb:507:in `call'
/var/lib/gems/1.9.1/gems/railties-4.0.5/lib/rails/application.rb:97:in `call'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
/usr/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/usr/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/usr/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
DEPRECATION WARNING: You didn't set config.secret_key_base. Read the upgrade documentation to learn more about this new config option. (called from service at /usr/lib/ruby/1.9.1/webrick/httpserver.rb:138)
[2014-12-18 13:15:07] ERROR RuntimeError: You must set config.secret_key_base in your app's config.
/var/lib/gems/1.9.1/gems/railties-4.0.5/lib/rails/application.rb:145:in `env_config'
/var/lib/gems/1.9.1/gems/railties-4.0.5/lib/rails/engine.rb:507:in `call'
/var/lib/gems/1.9.1/gems/railties-4.0.5/lib/rails/application.rb:97:in `call'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/lock.rb:17:in `call'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
/usr/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
/usr/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
/usr/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
対応
railsのバージョンが問題のようです。gemfileを開いてrailsのバージョンを4.0.5から4.1.0にしました。
gem 'rails', '4.0.5'
上記を次のように変更した。
gem 'rails', '4.1.0'
その後にbundleのupdateをした。
bundle update
サーバを起動させてた後、無事アクセスに成功。
rails server