简体   繁体   English

使用Capistrano部署Rails应用程序 - Rbenv版本问题

[英]Deploying Rails App Using Capistrano - Rbenv version issue

I am trying to deploy my Rails App to Server using capistrano... 我正在尝试使用capistrano将我的Rails应用程序部署到服务器...

But I am facing an issue with rbenv version... 但我面临rbenv版本的问题......

Here is my Capfile 这是我的Capfile

require 'capistrano/setup'

require 'capistrano/deploy'

require 'capistrano/rbenv'
require 'capistrano/bundler'
require 'capistrano/rails/assets'
require 'capistrano/rails/migrations'

set :rbenv_custom_path, '/home/renil/.rbenv'

Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }

I got the rbenv path from which rbenv and set custom path 从rbenv的rbenv路径,并设置自定义路径

set :rbenv_custom_path, '/home/renil/.rbenv' set:rbenv_custom_path,'/ home / pretty / .rbenv'

In my deploy.rb file, I set 在我的deploy.rb文件中,我设置了

set :rbenv_ruby, '1.9.3p484' 设置:rbenv_ruby,'1.9.3p484'

But when I am running cap production deploy:setup_config I am getting the following error... 但是,当我运行cap production deploy:setup_config时,我收到以下错误...

DEBUG [0656253d] Finished in 3.246 seconds with exit status 1 (failed).
ERROR rbenv: 1.9.3p484 is not installed or not found in /home/renil/.rbenv/versions/1.9.3p484

Try set :rbenv_ruby, '1.9.3-p551' . 尝试set :rbenv_ruby, '1.9.3-p551' Notice the dash. 注意破折号。

If this doesn't help, make sure you have that version installed on your server. 如果这没有帮助,请确保您的服务器上安装了该版本。 rbenv install 1.9.3-p551 . rbenv install 1.9.3-p551

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM