Managing Ruby / Rails Versions in Windows

0

I use Windows and I have Ruby / Rails installed on my machines using Rails Installer .

Currently I have installed Ruby 1.9.3 and Rails 4.0.2.

Today I read about the new Rails 4.1 and thought:

  • If I installed Rails 4.1 on my machine, would I be able to work normally on applications created for 4.0?

  • If not, how do I manage different versions in Windows?

asked by anonymous 30.04.2014 / 14:46

3 answers

0

I created another answer because @ Ivan_Santos is too short.

Updating Rails in Ruby 1.9.3

  • Run gem update rails .

Installing Ruby 2.0 and Rails on top of it

  • Having version 1.9.3 already installed, I used gem install pik , then pik_install c:\pik and added c:\pik to variable PATH environment to install pik.

  • Then I used pik install ruby 2.0 to install Ruby 2.0.0.

  • Then I went to C:\RailsInstaller\DevKit (or if you installed DevKit manually, go to the installation folder [which should also be added to% environment variable]) and added PATH to - C:\Users\[nome_do_meu_usuario]\.pik\rubies\Ruby-200-p195 and I ran config.yml in cmd.

  • Then I rolled ruby dk.rb install to mark version 2.0.0 as active. (You can check it using pik use 200 ).

  • This has been done with ruby -v to install Rails 4.1.

I've usually been able to work with applications made for previous versions of Rails, such as versions 3.x and 4.0, but for this I had to run gem install rails in the application folder before.

    
01.05.2014 / 20:39
1

You can use something similar to RVM to manage ruby versions in windows: link

    
01.05.2014 / 06:02
1

Link

On this site link above @GuilhermeGarnier teaches step by step how to do this.

Hint: Have you heard of Vagrant? There is a link from Nando Vieira's website that talks about him and it would be great for you not to have this headache in the future. Vagrant

    
19.05.2014 / 16:35