Travis CLI produces error in ruby project
<p>I just want to use travis CLI to encrypt my environment variable and use it in <code>.travis.yml</code> file. However when I run a simple <code>travis login</code> command in my project directory it gives me this error:</p>

<pre><code>/home/saurabh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for #&lt;Gem::Specification:0x55cf1c travis-1.8.2&gt; (NoMethodError)
    from /home/saurabh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path'
    from /home/saurabh/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in `require'
    from /home/saurabh/.rvm/gems/ruby-2.3.1/gems/travis-1.8.2/bin/travis:7:in `&lt;top (required)&gt;'
    from /home/saurabh/.rvm/gems/ruby-2.3.1/bin/travis:23:in `load'
    from /home/saurabh/.rvm/gems/ruby-2.3.1/bin/travis:23:in `&lt;main&gt;'
    from /home/saurabh/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
    from /home/saurabh/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `&lt;main&gt;'
</code></pre>

<p>What can be the reason for this and how do I solve this?</p>