Managing Ruby/Rails versions on Windows

Asked

Viewed 644 times

0

I use Windows and 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 I thought:

  • If I installed Rails 4.1 on my machine, I could work normally on the applications created for 4.0?

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

3 answers

1

1

Link

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

Tip: Have you heard of Vagrant? There is a link from the site of Nando Vieira who talk about it and it would be very good for you not to have this headache in the future Vagrant

  • On this other question here I was already suggested to use Vagrant, but by the tutorials I found it complicated. I am currently trying to mount a VM with Ubuntu Server manually. I’ve been able to access it via SSH (using bridge mode networking). Git/Ruby/Rails now remains to be installed and shared folder set up.

  • By the way, thank you for your attention to a question that already has correct answer. =)

  • To codar Ruby on Windows will always give a headache. Has Gem that does not work and has others that are very slow compared to Unix/linux based operating system. What you can do and a dualboot on your hd or try to use the same vangrant.

  • As a matter of fact I just installed Ruby/Rails on my Virtualbox VM here and am impressed with the performance of the generators! Just seeing to realize how slow Ruby in Windows is! The only thing that is slower is via browser, which before was by localhost:3000 and now by IP (172.*.*.*:3000). It must be the way I set up the network (Bridge mode). I made using Ubuntu Server 14.04 without using Vagrant and I think it will suit me very well. Hugs! =)

0


I created another answer because @Ivan_santos is too short.


Upgrading Rails in Ruby 1.9.3

  • Spin gem update rails.

Installing Ruby 2.0 and Rails on top of it

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

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

  • Then I went on C:\RailsInstaller\DevKit (or if you installed Devkit manually, go to the installation folder [which should also be added the variable PATHenvironment]) and added - C:\Users\[nome_do_meu_usuario]\.pik\rubies\Ruby-200-p195 to the archive config.yml and rode ruby dk.rb install at cmd.

  • Then I went around pik use 200 to mark version 2.0.0 as active. (You can check using ruby -v).

  • Done that rode gem install rails to install Rails 4.1.

I could normally work with applications made for earlier versions of Rails, such as versions 3.x and 4.0, but for that I had to run bundle install in the application folder before.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.