1

I am making a rather simple Rails app with Rails 4.1.6. Initially, I used Ruby version 1.9.3 (which is what I used for another project, and this Ruby version was set as default), but half way through the app I decided to change the Ruby version to the most recent 2.1.3 (rvm use 2.1.3). After the change of the Ruby version, I re-bundled.

For debugging purposes, I added pry, because debugger doesn't work with recent versions of Ruby:

Gemfile:

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

Now every time I try to enter the rails console (rails c), I get the following error:

Could not find byebug-3.5.1 in any of the sources

Which is strange, because the list of gems printed out in the console after bundling contains the following:

Using byebug 3.5.1
<...>
Using pry 0.10.1
Using pry-byebug 2.0.0
Using pry-rails 0.3.2

and the command bundle show byebug

returns:

/home/<my home directory>/.rvm/gems/ruby-2.1.3/gems/byebug-3.5.1

I tried to bundle update and to delete the Gemfile.lock and re-bundle, but the error remains. Could you suggest how to solve it?

azangru
  • 2,644
  • 5
  • 34
  • 55

1 Answers1

1

By a stroke of luck, I found an answer here.

Apparently, Rails 4.1 uses something called "springs". I have no idea what they are, but it seems they were interfering with the rails console. After I killed the springs, the console started working.

Looks like black magic. If anyone could explain what these springs are and why they were preventing rails console from starting, I would be much obliged.

azangru
  • 2,644
  • 5
  • 34
  • 55