rvm и Capistrano не работят заедно: настройката rvm_bin_path не влиза в сила

Опитвам се да настроя внедряване на Capistrano за моя Rails проект. Сървърът използва rvm. Имам нужда от скрипта, за да стартирам инсталиране на пакет, оттук и необходимостта rvm да работи с Capistrano.

Когато стартирам „cap production deploy“, получавам това -- някакви идеи защо?

INFO [a5b60a00] Running /usr/local/rvm/bin/rvm wrapper system coupons bundle gem rake ruby on mydomain.com
DEBUG [a5b60a00] Command: /usr/local/rvm/bin/rvm wrapper system coupons bundle gem rake ruby
DEBUG [a5b60a00]    No bin path suitable for lining wrapper. Try setting 'rvm_bin_path'.
cap aborted!
rvm stdout: Nothing written
rvm stderr: Nothing written
/Users/chad/.rvm/gems/ruby-1.9.3-p194/gems/sshkit-1.1.0/lib/sshkit/command.rb:94:in `exit_status='
/Users/chad/.rvm/gems/ruby-1.9.3-p194/gems/sshkit-1.1.0/lib/sshkit/backends/netssh.rb:125:in `block (4 levels) in _execute'
/Users/chad/.rvm/gems/ruby-1.9.3-p194/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:551:in `call'
/Users/chad/.rvm/gems/ruby-1.9.3-p194/gems/net-ssh-2.7.0/lib/net/ssh/connection/channel.rb:551:in `do_request'
...

Имам това в deploy.rb:

set :rvm_ruby_string, 'ruby-1.9.3-p194'
set :rvm_bin_path, '/usr/local/rvm/bin'
set :rvm_type, :system

и Capfile:

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

и Gemfile:

gem 'capistrano'
gem 'capistrano-rails'
gem 'capistrano-rvm'
gem 'capistrano-bundler'

ls /usr/local/rvm/bin показва:

bundle                      rake                         ruby-1.9.3-p194         rvm-smile
erb-ruby-1.9.3-p194         rake-ruby-1.9.3-p194         ruby-1.9.3-p194@global  rvmsudo
erb-ruby-1.9.3-p194@global  rake-ruby-1.9.3-p194@global  rvm                     testrb-ruby-1.9.3-p194
gem-ruby-1.9.3-p194         rdoc-ruby-1.9.3-p194         rvm-auto-ruby           testrb-ruby-1.9.3-p194@global
gem-ruby-1.9.3-p194@global  rdoc-ruby-1.9.3-p194@global  rvm-exec
irb-ruby-1.9.3-p194         ri-ruby-1.9.3-p194           rvm-prompt
irb-ruby-1.9.3-p194@global  ri-ruby-1.9.3-p194@global    rvm-shell

и rvm списък:

rvm rubies

=* ruby-1.9.3-p194 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

person Chad Johnson    schedule 20.10.2013    source източник
comment
пробвал ли си: bundle exec cap production deploy ?   -  person ipd    schedule 21.10.2013


Отговори (1)


Така! Оказва се, че добавянето на моя потребител „deploy“ на моя сървър към групата „rvm“ реши проблема.

person Chad Johnson    schedule 20.10.2013
comment
Това е документираният начин за използване на RVM, нали? - person Lee Hambley; 21.10.2013
comment
Предполагам. Очевидно не съм използвал RTFM. - person Chad Johnson; 21.10.2013