我正在使用Ruby 2.3和Rails 4.2.7。我正在尝试在我的系统上安装Capistrano,但是当我尝试使用“cap -version”检查版本时,我遇到了一个莫名其妙的错误。在安装我的宝石时,有谁知道错误意味着什么以及我做错了什么?下面是安装gem然后运行命令...
的输出root@ubuntumachine:/home/rails/networkproject# gem install capistrano
Successfully installed capistrano-3.6.1
Parsing documentation for capistrano-3.6.1
Done installing documentation for capistrano after 1 seconds
1 gem installed
root@ubuntumachine:/home/rails/networkproject# cap --version
/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for #<Gem::Specification:0xa16c74 capistrano-3.6.1> (NoMethodError)
from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path'
from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in `require'
from /usr/local/rvm/gems/ruby-2.3.0/gems/capistrano-3.6.1/bin/cap:2:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.3.0/bin/cap:23:in `load'
from /usr/local/rvm/gems/ruby-2.3.0/bin/cap:23:in `<main>'
from /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
答案 0 :(得分:0)
几个月前我遇到过这样的事情,但问题是间歇性的。
要立即/临时修复,请尝试运行gem pristine --all
。
要获得永久性解决方案,请确保通过运行gem update --system
运行最新版本的RubyGems。