Freezing rails to an older version using gems

You want to deploy to a shared host (dreamhost) that has a later version of rails from the one you have developed your application.
You also have a later version installed in your development pc,and using rake rails:freeze:gems uses the latest one and not the one you want.

Use the following to freeze the specific version you want, and by using your gems you have installed:
rake rails:freeze:gems VERSION=2.3.2