spring
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
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?
Nice! Fixed for me
@brancusi Awesome, thanks for telling me!
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!
I also had this problem. Thanks @henrik for the solution!
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.
+1 for warning about this. Thankfully Google now ranks this page highly for the error message at least.
thanks @henrik !
Thanks!
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