0

I’m using Ruby 2.3 with Rails 4.2.7. I'm trying to install Capistrano on my system but am getting a baffling error when I try and check the version using “cap —version”. Does anyone know what the error means and what I have done wrong when installing my gem? Below is the output of installing the gem and then running the command …

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>'

1 Answers1

0

I ran into something like this a couple of months ago, but the problem was intermittent.

For an immediate/temporary fix, try running gem pristine --all.

For a permanent solution, make sure you're running the latest version of RubyGems by running gem update --system.

MarsAtomic
  • 10,436
  • 5
  • 35
  • 56