我手动安装时与生产商的宝石路径之间的差异似乎与捆绑卡尼斯特拉诺之间存在差异.
在rvm安装ruby 1.9.2并创建gemset“myapp”之后,我确实通过gem install bundler安装了bundler.
它安装在路径中:
/usr/local/rvm/gems/ruby-1.9.2-p290@myapp/gems
通过Capistrano的Bundler将剩余的宝石安装到:
/usr/local/rvm/gems/ruby-1.9.2-p290@myapp/ruby/1.9.1/gems
我的deploy.rb文件的开头是:
- $:.unshift(File.expand_path('./lib',ENV['rvm_path']))
- require 'rvm/capistrano'
- require 'bundler/capistrano'
- set :rails_env,'production'
- set :rvm_type,:system
- set :rvm_ruby_string,"ruby-1.9.2-p290@myapp"
- set :rvm_path,"/usr/local/rvm"
- set :rvm_bin_path,"#{rvm_path}/bin"
- set :rvm_lib_path,"#{rvm_path}/lib"
- set :default_environment,{
- 'PATH' => "#{rvm_path}/gems/ruby/1.9.1/bin:#{rvm_bin_path}/bin:$PATH",'RUBY_VERSION' => '1.9.2','GEM_HOME' => "#{rvm_path}/gems/#{rvm_ruby_string}",'GEM_PATH' => "#{rvm_path}/gems/#{rvm_ruby_string}",'BUNDLE_PATH' => "#{rvm_path}/gems/#{rvm_ruby_string}"
- }
- set :bundle_dir,"#{rvm_path}/gems/#{rvm_ruby_string}"
- set :bundle_flags,"--deployment --verbose"