Upgrading rails

Hi ia m working on a project carried out using an older version of rails
1.2.4 or 5. And I want to upgrade it to 1.2.6. Can you tell me the
command to upgrade or install that version. I am not sure if this is
correct

gem install rails v=1.2.6

gem help install

First item under Options