Confusingly, bundler can have more than one version of Rails installed at once. if you had many versions, when you ran rails new, it probably used the default one, which could have been a very old one for you. This often confuses new developers, and especially if you installed Rails years ago and then come back to pick it up again.
To see which versions of Rails you have installed in bundler, use
gem list |grep rails
(here you are grepping, or searching against, the output for the string “rails”; without grep you would see all of your gems)
You’ll see some other gems with the name “rails” in them too, fortunately, all the rails gems are numbered concurrently.
TO install a different version of Rails in your bundler (remember, this just installs the gem code in your bundler’s system ready for use)
gem install rails -v 184.108.40.206
Finally, if you want to force rails new to use a specific version, use underscores before the “new” (that is, between “rails” and “new”)
rails _220.127.116.11_ new
4 thoughts on “Getting Stuck on the Version of Rails In Your Bundler”
To the jasonfleetwoodboldt.com webmaster, Your posts are always on topic and relevant.
Hello jasonfleetwoodboldt.com webmaster, You always provide clear explanations and definitions.
Hello jasonfleetwoodboldt.com owner, You always provide clear explanations and step-by-step instructions.
Dear jasonfleetwoodboldt.com owner, Your posts are always well-supported by facts and figures.