spring icon indicating copy to clipboard operation
spring copied to clipboard

Can get e.g. “Your Ruby version is 2.1.1, but your Gemfile specified 2.1.2” when changing Ruby version without restarting Spring

Open henrik opened this issue 10 years ago • 9 comments

I started a Rails 4 app with Ruby 2.1.1 but then I upgraded to 2.1.2 (in Gemfile and .ruby-version), and started getting this error e.g. opening a console or generating a migration.

It was fixed by running spring stop.

My theory is that Spring kept on running on 2.1.1 and so caused this error.

It was a bit painful. Is there any way a situation like this one could be detected and self-healed or give a better error message?

henrik avatar Jun 14 '14 10:06 henrik

Nice! Fixed for me

brancusi avatar Sep 17 '14 21:09 brancusi

@brancusi Awesome, thanks for telling me!

henrik avatar Sep 19 '14 18:09 henrik

Got Your Ruby version is 2.1.2, but your Gemfile specified 2.1.3 when running rails c.

Running spring stop fixed the issue for me, thanks @henrik!

dideler avatar Sep 29 '14 22:09 dideler

I also had this problem. Thanks @henrik for the solution!

vesan avatar Sep 30 '14 10:09 vesan

why doesn't this get caught if .ruby-version and/or Gemfile are watched by spring? i tried adding these but i still saw the same issue.

modosc avatar Oct 08 '14 16:10 modosc

+1 for warning about this. Thankfully Google now ranks this page highly for the error message at least.

mahemoff avatar Oct 31 '14 09:10 mahemoff

thanks @henrik !

worldask avatar Nov 11 '14 13:11 worldask

Thanks!

george-carlin avatar Dec 04 '14 15:12 george-carlin

StackOverflow answer with 20 35 38 40 upvotes at the time of writing (suggesting a lot of people have run into it): http://stackoverflow.com/a/24206317/6962

henrik avatar Apr 23 '15 06:04 henrik