要求“捆绑商/ capistrano”中断capistrano [英] require 'bundler/capistrano' breaks capistrano

查看:73
本文介绍了要求“捆绑商/ capistrano”中断capistrano的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将此行添加到了deploy.rb:

I added this line to my deploy.rb:

require 'bundler/capistrano'

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

and now I get this message when I run 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'

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

Here is some other relevant information:

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]


推荐答案

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

The output from cap -T says that it's running in Ruby 1.8, not 1.9 (look at the paths to the gems in the output). Check your PATH. Even better, use RVM to manage your Ruby versions and you won't get these kinds of problems.

这篇关于要求“捆绑商/ capistrano”中断capistrano的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆