我使用在Capistrano的我deploy.rb文件进行如下配置:
require 'bundler/capistrano'
require 'rvm/capistrano'
set :bundle_cmd, "/home/deployment/.rvm/gems/ruby-1.9.3-p194@global/bin/bundle"
set :default_environment, {
'PATH' => "/home/deployment/.rvm/gems/ruby-1.9.3-p194/bin:/home/deployment/.rvm/bin:$PATH",
'RUBY_VERSION' => 'ruby 1.9.3',
'GEM_HOME' => "/home/deployment/.rvm/gems/ruby-1.9.3-p194",
'GEM_PATH' => "/home/deployment/.rvm/gems/ruby-1.9.3-p194",
'BUNDLE_PATH' => "/home/deployment/.rvm/gems/ruby-1.9.3-p194"
}
但是,当我运行cap deploy:update
我得到这个:
* executing "cd /var/www/currienet/marketplace/releases/20120928140140 && /home/deployment/.rvm/gems/ruby-1.9.3-p194@global/bin/bundle install --gemfile /var/www/currienet/marketplace/releases/20120928140140/Gemfile --path /var/www/currienet/marketplace/shared/bundle --deployment --quiet --without development test"
也就是说,它不是包路径(--path参数)设置为我希望它是。
我已经尝试了一些教程,包括RVM Capistrano的教程 ,但似乎没有任何工作。 它继续使用Capistrano的默认。
斯特拉努还创建具有以下.bundler / config中的应用
BUNDLE_FROZEN: '1'
BUNDLE_PATH: /var/www/currienet/marketplace/shared/bundle
BUNDLE_DISABLE_SHARED_GEMS: '1'
BUNDLE_WITHOUT: development:test
开发机:Windows 7中捆绑(1.0.22),Capistrano的(2.12.0),RVM-Capistrano酒店(1.2.7),导轨(3.2.8),(无RVM)
制作:Debian的,捆绑(1.2.1)(无Capistrano的),(无RVM-Capistrano酒店),导轨(3.2.8),RVM 1.16.5