テスト環境で動作するRailsアプリケーションがあります。
ruby -v => 1.9.3p194
rails -v => 3.2.12
gem -v => 1.8.23
デプロイ先のサーバーでは、出力は次のとおりです。
ruby -v => 1.9.3p0
rails -v => 3.2.12
gem -v => 1.8.15
サーバーの新規インストールを開始しましたが、サーバーバージョンのrubyとgemを一致させることができません。
さらに、サーバーでrailsを実行すると(テストのためだけに)、これは失敗した出力です。
rails s
=> Booting WEBrick
=> Rails 3.2.12 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/var/lib/gems/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load': /var/www/New/confed ':', expecting kEND (SyntaxError)
match '/about', to: 'static_pages#about'
^
/var/www/New/config/routes.rb:6: syntax error, unexpected ':', expecting kEND
match '/cv', to: 'static_pages#cv'
^
from /var/lib/gems/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
from /var/lib/gems/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:236:in `load_dependency'
from /var/lib/gems/1.8/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:245:in `load'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:40:in `each'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:26:in `updater'
from /var/lib/gems/1.8/gems/activesupport-3.2.12/lib/active_support/file_update_checker.rb:78:in `call'
from /var/lib/gems/1.8/gems/activesupport-3.2.12/lib/active_support/file_update_checker.rb:78:in `execute'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:27:in `updater'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/application/finisher.rb:66
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `instance_exec'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/initializable.rb:30:in `run'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/initializable.rb:55:in `run_initializers'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `each'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/initializable.rb:54:in `run_initializers'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/application.rb:136:in `initialize!'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `send'
from /var/lib/gems/1.8/gems/railties-3.2.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /var/www/New/config/environment.rb:5
from /var/www/New/config.ru:3:in `require'
from /var/www/New/config.ru:3
from /var/lib/gems/1.8/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
from /var/lib/gems/1.8/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
from /var/www/New/config.ru:0:in `new'
from /var/www/New/config.ru:0
私は自分のテストシステムを見てきましたが、持っている/var/lib/gems/1.8
だけではありません/var/lib/gems/1.9.1