Reputation: 1111
I cloned one of my 3years old project from Github to resurrect, however I'm getting bunch of migrations, gem, etc errors. Googling gives me tips about possibly using wrong ruby version.
I want to assign the specific rbenv local rubyver
but I don't know which one I used and I can't find it in any settings?
Any idea how I can find what Ruby version is this project using?
Upvotes: 2
Views: 1732
Reputation: 211540
There's a few places this might be annotated:
.ruby-version
file, though these are often ignored to avoid friction between developers with slightly different versions. This is what rbenv
uses, as well as other tools like RVM.Gemfile
can have a ruby
version lock in it, though this is usually a minimum requirement, like >= 2.3.0
.README
if the developer is kind.Otherwise, there's no real way to know.
It's worth noting that Ruby 2.0, 2.4 and 3.0 are often the biggest upgrade hurdles, so it's worth trying with the latest version you can get away with, like 2.7.2 if practical, 3.0.0 if possible.
Upvotes: 3