Ruby on Rails version '1.2.3' not found

The application /home/.tex/gramweb/gram_qa/releases/20080305215922 requires Ruby on Rails version 1.2.3, which is not installed. Please install it with the following command:
sudo gem install rails --version 1.2.3