我正在尝试为我的Rails项目设置Capistrano部署。服务器使用rvm。我需要该脚本来运行软件包安装,因此需要rvm与Capistrano一起工作。rvm和Capistrano不能一起工作:rvm_bin_path设置不起作用
当我运行“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 /本地/ RVM/bin显示:
bundle rake ruby-1.9.3-p194 rvm-smile
erb-ruby-1.9.3-p194 rake-ruby-1.9.3-p194 [email protected] rvmsudo
[email protected] [email protected] rvm testrb-ruby-1.9.3-p194
gem-ruby-1.9.3-p194 rdoc-ruby-1.9.3-p194 rvm-auto-ruby [email protected]
[email protected] [email protected] rvm-exec
irb-ruby-1.9.3-p194 ri-ruby-1.9.3-p194 rvm-prompt
[email protected] [email protected] rvm-shell
和RVM列表:
rvm rubies
=* ruby-1.9.3-p194 [ x86_64 ]
# => - current
# =* - current && default
# * - default
你有没有尝试过:'bundle exec cap production deploy'? – ipd