2017-04-07 29 views
-2

,当我运行cap production deploy我得到以下错误:如何使用Ruby 2.4.0服务器

cap production deploy 

SSHKit::Command::Failed: ruby exit status: 2 
ruby stdout: Nothing written 
ruby stderr: Ruby ruby-2.4.0 is not installed 

我指定我deploy.rb文件中的Ruby版本:

set :passenger_restart_with_touch, true 
set :rvm_ruby_version, 'ruby-2.4.0' 

和将它包含在我的Gemfile中:

gem "capistrano", "~> 3.8" 
gem 'capistrano-bundler' 
gem 'capistrano-rails' 
gem 'capistrano-rvm' 
gem 'capistrano-passenger' 

我该如何在服务器上运行Ruby版本2.4.0而无需进入服务器?

+0

你的大写锁定键似乎被打破。您可能想要修复它。 “when” - >“当”,“我” - >“I”,“ruby” - >“Ruby”,“gemfile” - >“Gemfile”。 SO不是一个讨论列表,它是一个参考网站,就像是一本关于文法,拼写和标点符号的百科全书。 –

回答

0

你需要在服务器上运行此:

rvm install 2.4.0 
0

使用

rvm install 2.4.0 

,然后在应用程序的根路径安装在服务器上的Ruby版本,使用安装了Ruby:

rvm use 2.4.0