Railsのバージョンアップ後のエラー
大分前に作りかけていたアプリケーションを実行してみると下記のようなエラーになってしまう。
Missing the Rails 2.1.0 gem. Please `gem install -v=2.1.0 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
Railsをバージョンアップすると毎回遭遇しているこのエラー、
特定のRailsをアプリケーション内に含めてしまえば良いのだが
開発環境のMacBook Proに入っているRailsのバージョン
Macintosh:~ kuru$ rails --version Rails 2.3.2
config/environment.rbのRAILS_GEM_VERSIONの設定
RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
config/environment.rbのRAILS_GEM_VERSIONの設定を下記のように変えて実行してみる
RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION
上記の設定でアプリケーションを起動すると今度は下記のようなエラーが発生
=> Booting Mongrel => Rails 2.3.2 application starting on http://0.0.0.0:3000 /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- gettext/rails (MissingSourceFile) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require' from /Users/kuru/NetBeansProjects/atotok/atotok_app/config/initializers/gettext.rb:1 from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:145:in `load_without_new_constant_marking' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:145:in `load' from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in' ... 13 levels... from /Library/Ruby/Gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:84 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' from script/server:3