Can I use a different version of rails to catalog various projects on Windows?

It is currently Rails 4.0.2installed on my machine Windowsand I use it for several rails projects. But I want to use the version Rails 3.2.8for another project.

So my question is: can I specify the version 3.2.8in one project and save it 4.0.2in all the rest by installing all the dependencies for 3.2.8?

+4
source share
3 answers

Yes!

Install the rails 3.2.8.

Then you can specify which version of the rails you want to use:

rails _3.2.18_ new mySuperSecretProject

In each project you can use rails _xxx_ console, but it is easier to use binstubs directly:bin/rails console

+3

, , Intrepidd.

- Gemfile gem .

0

Rails :

1) gem Gemfile

gem 'rails','3.2.8' gem 'rails', '4.0.2'

2) bundle install. , .

3) rails 4.0.2: rails 3.2.8 , 'bundle update rails', , .

If you want to run these projects in different ruby ​​versions, then on Linux platforms RVM- the best option. But on Windows, RVM will not work. A good option would be a tool Pik. Pik is a tool for managing multiple versions of ruby ​​on Windows.

Please refer here for the same. Hope this helps :)

0
source

Source: https://habr.com/ru/post/1534286/


All Articles