tjgrathwell / rails5-spec-converter

A tool to upgrade Rails 4-style specs to Rails 5-style
MIT License
176 stars 14 forks source link

Crash "undefined method 'this'" #5

Closed oliverklee closed 7 years ago

oliverklee commented 7 years ago

When I run the converter with this gem …

https://github.com/braingourmets/speedcards-mnemonics

… I get this error/crash:

klee@gonzales:~/src/ruby/speedcards-mnemonics$ rails5-spec-converter 
/home/klee/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2158:in `method_missing': undefined method `this' for #<Gem::Specification:0xe37df8 rails5-spec-converter-2.0.0> (NoMethodError)
        from /home/klee/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1057:in `find_active_stub_by_path'
        from /home/klee/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in `require'
        from /home/klee/.rvm/gems/ruby-2.3.1/gems/rails5-spec-converter-2.0.0/exe/rails5-spec-converter:4:in `<top (required)>'
        from /home/klee/.rvm/gems/ruby-2.3.1/bin/rails5-spec-converter:23:in `load'
        from /home/klee/.rvm/gems/ruby-2.3.1/bin/rails5-spec-converter:23:in `<main>'
        from /home/klee/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
        from /home/klee/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'

This is on Linux with Ruby 2.3.1.

tjgrathwell commented 7 years ago

Looks like this is a rubygems + RVM incompatibility, the fix is to update your rubygems with gem update --system

https://github.com/rubygems/rubygems/issues/1420

oliverklee commented 7 years ago

This has solved the problem for me. Thanks! :heart: