I do not know why you need to run such an old version of Ruby, but I guess there are reasons.
gem install rails
will just try to install the latest version of Ruby on Rails that obviously is not compatible with such ancient version of Ruby as 1.9.2.
There are pages that list the compatibility between certain Ruby and Ruby on Rails versions, for example, this or this. When looking at those tables, I guess the best choice seems to be Ruby on Rails 3.2.x. To install the latest 3.2.x version of Rails use this command:
gem install rails -v 3.2.22.5
Running such ancient Ruby and Ruby on Rails will lead to endless problems. Foremost, there are likely unfixed security vulnerabilities in those old versions. But finding good documentation, compatible gems and support in general will be hard too.
I guess from your question that you inherited an old project without much documentation and – most importantly – without a Gemfile
. Therefore, I suggest adding bundler and a proper Gemfile
. You will need to figure out all your app's dependencies to install the application anyway, better document those dependencies with bundler right from the start. This examples might help.