Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install a specific Ruby on Rails version on Windows

Normally I use:

gem install rails 

I can install Rails on Windows, but by default, I guess the latest version, version 3.0.3 is installed.

So if I want to install some other version of Rails, let's say 3.0.1, how can I do it?

like image 675
Haiyuan Zhang Avatar asked Nov 17 '10 05:11

Haiyuan Zhang


People also ask

How do I install a specific version of Ruby?

Use the secure installation method. Read the installation instructions — you probably want the single-user configuration. Use rvm list known to list available Rubies and then run rvm install x.x.x to install a specific version. Use rvm use x.x.x --default to change your default Ruby.

How do I install an older version of Ruby on Windows?

Go to your file explorer and make sure the folder is gone. Now go to http://rubyinstaller.org/downloads/ and pick an older version. Follow that process just like the first time you installed ruby. Then go get nokogiri and whatever other gems you like and enjoy.

Can I install Ruby on Rails on Windows?

Windows 10 allows you to run various Linux operating systems inside of Windows similar to a virtual machine, but natively implemented. We'll use this to install Ruby and run our Rails apps.


1 Answers

Example:

gem install rails -v 3.0.1 

Also, all the options for gem can be seen by running gem -h

A note:
If you're on *nix using RVM is highly recommended for Ruby management.

like image 165
Zabba Avatar answered Oct 13 '22 23:10

Zabba