To freeze a Ruby on Rails application to a specific version of Rails (e.g: 2.3.5) just execute the following Rake command in your projects root directory.

rake rails:freeze:edge RELEASE=2.3.5