Reputation: 4320
I have to begin local development of this open-source project, but it uses Rails 3.2.21, and I already have Rails 4.x installed. How can I specify that I want to work with Rails 3 only when working on this app?
Upvotes: 1
Views: 42
Reputation: 42819
You should use a ruby version manager, something like rvm
, rbenv
or chruby
, each doc will tell you what to do.
This way you could have different ruby versions installed, and with bundler you could use different rails versions according to the Gemfile.
Just add a .ruby-version
file inside the project root, and the version manager should detect it.
Upvotes: 2
Reputation: 2916
If you will change the rails version directly in Gemfile, it may raise issue for compatibility later:
Instead use RVM or other related version manager and after isntalling use below command: - rvm use 1.9.3 - bundle install - Then mention the version in Gem file
Upvotes: 0
Reputation: 4571
To use the specific rails version with your app you can do this:
rails _3.2.21_ myApp
If you don't already have rails 3.2.21 installed just run this:
gem install 'rails' -v '3.2.21'
Upvotes: 0
Reputation: 13531
In your Gemfile specify the rails version you want that project to use:
# Gemfile
gem "rails", "~> 3.2.21"
Upvotes: 1