Ask A Question


You’re not receiving notifications from this thread.

Configure ruby projects of old version

MohitChavda asked in Rails

I am working on Rails 6.0.0 and now i want to configure one project which build in rails version 5.1.0

Do in need to install rails 5.1.0 and then install required bundle?
Or i can configure and run rails project with version 6.0.0 with not any changes.


You can do:

gem install rails -v 5.1.7
rails _5.1.7_ new myapp

Hi Chris,

Thanks for your reply, so in this way i can run both the version projects 6.0.0 and 5.1.0 in same machine, right?

When install bundles for required gems in config file it is based on rails version 5.1.0 (if projects are in 5.1.0), right?


This would help you create new Rails apps with different versions. Bundler already handles separate Rails versions for each app, so that's already handled for you. It installs whatever is in the Gemfile and uses that. Sometimes you may need to run "bundle exec rails" to make sure it uses the app's Rails version, not the globally installed version.

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 80,973+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.