banister / method_source

return the sourcecode for a method
MIT License
361 stars 43 forks source link

Version 1.0.0 causes downstream breakages (pry-rails) #65

Closed jhsu802701 closed 4 years ago

jhsu802701 commented 4 years ago

Running the "rails generate" command when pry-rails is installed leads to the error "undefined method `create_command' for #". The "rails generate" command works if pry-rails is not installed.

The pry-rails gem was last updated on December 30, 2018. The pry gem (dependency of pry-rails) was last updated on November 12, 2018. The coderay gem (dependency of pry) was last updated on September 3, 2017.

The Gemfile.lock file shows that version 1.0.0 (latest one) of the method_source gem is in use. This version of the gem was published today, March 19, 2020.

kyrylo commented 4 years ago
jhsu802701 commented 4 years ago

I use the latest releases of the pry and pry-rails gems. Not pinning the method_source gem (which means using version 1.0.0) led to the error I cited. I was able to resolve the problem by pinning method_source to version 0.9.2.

kyrylo commented 4 years ago

I cannot reproduce this. I created a new Rails 6 app, added pry-rails as a dependency and generated a new model. It worked without any errors.

I am going to close the issue because there's no repro case and I don't see how method_source is connected to the issue. We didn't make any changes to Pry commands in this gem.

jhsu802701 commented 4 years ago

I encountered this issue when creating a Rails 5.2 app. I know that Rails 6 is current, but I have to rely on 5.2 until I get through the latest Rails Tutorial.