0

When i am trying to execute:

bundle exec rails console

It is throwing me error as:

/gems/spring-3.1.1/lib/spring/application.rb:96:in `preload': Spring only supports Rails >= 5.2.0 (RuntimeError)

Earlier it was working fine. Can anyone help me with a workaround for this.

Shubham kumar
  • 712
  • 7
  • 12
  • someone asked this question with similar issue here which is not yet answered: https://stackoverflow.com/questions/69270436/rails-console-fails-to-run – Shubham kumar Jan 28 '22 at 20:06

1 Answers1

0

The workaround I did for this was to create a new project with rails 5.2.3 or something.

If you want to do the same, you can first list all your local gems by doing gem list rails --local

You will see all your rails versions installed locally.

Then do gem install rails -v '5.2.3'

Now go to a new project directory and run rails _5.2.3_ new appname

Now, you should be able to use the console, generate, migrate and other commands.

You can do bundle install after adding other relevant gems based on your apps requirement.