Question

included 'pry-rails' in my Gemfile run console and get the following

@marketplace-rails/gems/pry-rails-0.2.0/lib/pry-rails/commands.rb:3:in `block in <module:PryRails>': undefined method `create_command' for #<Pry::CommandSet:0x007fcfaa67a878> (NoMethodError)
Was it helpful?

Solution

  • Step 1. don't use 'pry-rails' ? (not sure how to get that gem working)
  • Step 2. in gemfile include gem 'pry'
  • Step 3. in application.rb include the following...
console do
  require "pry"
  config.console = Pry
end

run rails console be happy to have pry back in your life.

OTHER TIPS

For what it's worth, I just tried this:

group :development, :test do
  gem 'pry-rails'
end

Followed by a bundle install and a 'rails c' and pry came up.

Try stopping spring,

$ bin/spring stop

worked for me after installing the gem, didn't even have to change it in the config/environment/development file either

Make sure you have pry included in your Gemfile and add

config.console = Pry

to your config/environments/development.rb or to your config/application.rb if you want it in every environment.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top