How to Upgrade My Ruby 1.9.2-P0 to the Latest Patch Level Using Rvm

How do I upgrade my ruby 1.9.2-p0 to the latest patch level using rvm?

First of all, update your RVM installation by running rvm get stable.

To make sure you're running the new RVM version, you'll then need to run rvm reload (or just open a new terminal).

Once that's done, you can ask RVM to list the ruby versions available to install by running rvm list known.

In the output you should now see:

# MRI Rubies
...
[ruby-]1.9.2[-p320]
...

The square brackets around the patch level indicate that this is currently RVM's default patch level for ruby 1.9.2.

Finally, to install the new ruby version, just run rvm install 1.9.2 - and wait for it to compile!

How can I change Ruby to version 1.9.3 (again) with RVM?

You are not in the login shell. To enter the login shell try this command:

/bin/bash --login

After that you will be able to use RVM to select Ruby.

Also, there is permanent way, that you won't have to write this line everytime you open your terminal.
Try this:

Edit menu -> Profile Preferences 

A dialog will appear, now select Run command in login shell.

After that, whenever you open your terminal, you will enter into the login shell, and you will be able to use RVM.

There is another way, you can write /bin/bash --login in your .bash_profile which will load every time when you reboot.

How to upgrade Ruby to 2.0

Pik let you play with and manage multiple versions and flavours of ruby on on your Windows box. I have chosen this way because I'm not sure that everything I need will work on the first try with the new version, hence I want also to keep prior versions.

The installation is also simple: if you haven't jet Pik see topic: "Install pik using rubygems" then "pik install ruby 2.0.0"

for example:

Before

C:\Sites>pik list
160: jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (Java H...
165: jruby 1.6.5.1 (ruby-1.9.2-p312) (2012-01-25 fffffff) (Java HotSpot(T...
167: jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM)...
187: ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]
192: ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
* 193: ruby 1.9.3p125 (2012-02-16) [i386-mingw32]

Install

C:\Sites>pik install ruby 2.0.0
** Downloading: http://rubyforge.org/frs/download.php/76807/ruby-2.0.0-p0-i386-
mingw32.7z
...

After installation

C:\Sites>pik list
160: jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (Java H...
165: jruby 1.6.5.1 (ruby-1.9.2-p312) (2012-01-25 fffffff) (Java HotSpot(T...
167: jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM)...
187: ruby 1.8.7 (2011-02-18 patchlevel 334) [i386-mingw32]
192: ruby 1.9.2p0 (2010-08-18) [i386-mingw32]
* 193: ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
200: ruby 2.0.0p0 (2013-02-24) [i386-mingw32]

Now we can use version 2.0.0

C:\Sites>pik use 200

C:\Sites>ruby --version
ruby 2.0.0p0 (2013-02-24) [i386-mingw32]

Wondering where the hell are the Ruby folders

 C:\>echo %HOME%
C:\Users\rondinif

C:\>where ruby
C:\Users\rondinif\.pik\rubies\Ruby-200-p0\bin\ruby.exe

C:\>pik use 193
C:\>where ruby
C:\RailsInstaller\Ruby1.9.3\bin\ruby.exe

C:\>pik use 167
C:\>where ruby
INFO: Could not find files for the given pattern(s).
C:\>where jruby
C:\Users\rondinif\.pik\rubies\JRuby-167\bin\jruby

and so on...

How can I update Ruby version 2.0.0 to the latest version in Mac OS X v10.10 (Yosemite)?

Open your terminal and run

curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable

When this is complete, you need to restart your terminal for the rvm command to work.

Now, run rvm list known

This shows the list of versions of the Ruby interpreter.

Now, run rvm install ruby@latest to get the latest Ruby version.

If you type ruby -v in the terminal, you should see ruby X.X.X.

If it still shows you ruby 2.0., run rvm use ruby-X.X.X --default.

Prerequisites for Windows 10:

  • C compiler. You can use http://www.mingw.org/
  • make command available otherwise it will complain that "bash: make: command not found". You can install it by running mingw-get install msys-make
  • Add "C:\MinGW\msys\1.0\bin" and "C:\MinGW\bin" to your path environment variable

How to update Ruby to 1.9.x on Mac?

I'll make a strong suggestion for rvm.

It's a great way to manage multiple Rubies and gems sets without colliding with the system version.


I'll add that now (4/2/2013), I use rbenv a lot, because my needs are simple. RVM is great, but it's got a lot of capability I never need, so I have it on some machines and rbenv on my desktop and laptop. It's worth checking out both and seeing which works best for your needs.

Can I upgrade to the current version of Ruby (2.2.3) on OS X v10.6.8?

I suggest that you use RVM to install Ruby.

curl -sSL https://get.rvm.io | bash -s stable --ruby

You need to restart the terminal in order to run rvm:

rvm install 2.2
rvm use 2.2 --default

Moving my RVM project gemset to another patchlevel

Reference: http://ruby.about.com/od/rubyversionmanager/ss/Upgrading-To-1-9-2-Using-Rvm_6.htm

Alternatively, your gemsets can be migrated (or moved) from one version of Ruby to another. Remember that migrate moves gemsets, not leaving a copy behind. But if you wish to do it this way, you can run the following command.

rvm migrate 1.9.2-p180@project_name 1.9.2-p290@project_name

Ruby version 1.9.3 vs 2.0.0

  1. Take a look at: https://rvm.io/ Thanks to this tool you have ability to awesome things with ruby versions. To have multiple versions of RoR you can use: http://rvm.io/gemsets

  2. Sure, RoR 4.x is fully compatible with Ruby 1.9.3



Related Topics



Leave a reply



Submit