要求'bundler / capistrano'打破capistrano

时间:2010-12-22 06:26:24

标签: ruby capistrano bundler

我将此行添加到deploy.rb:

require 'bundler/capistrano'

现在我在运行cap -T时收到此消息:

/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- bundler/capistrano (LoadError)
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
    from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.8/lib/capistrano/configuration/loading.rb:152:in `require'

以下是其他一些相关信息:

dons-macbook:Gems don$ gem which bundler
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler.rb
dons-macbook:Gems don$ gem which capistrano
/usr/local/lib/ruby/gems/1.9.1/gems/capistrano-2.5.19/lib/capistrano.rb
dons-macbook:Gems don$ ruby --version
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]

1 个答案:

答案 0 :(得分:2)

cap -T的输出表示它在Ruby 1.8中运行,而不是1.9(查看输出中gems的路径)。检查您的PATH。更好的是,使用RVM来管理您的Ruby版本,您将不会遇到这些问题。