我有一个在我的测试环境中构建的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 s(只是为了测试)时,这是失败的输出:
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