Vendoring rails using a symlink

July 22, 2009

Been meaning to do this for ages!

First of all clone rails from git hub into a suitable folder

git clone git://github.com/rails/rails.git rails.git

I like to give repositories like this a .git extension so can easily differentiate from local things, but you can call the folder whatever you want.

After the repository is cloned be sure to checkout the branch you want, in my case git checkout origin/2-3-stable

Now you can vendor your rails projects by going into the root folder of the project and running

ln -s /path_to/rails.git vendor/rails

Adjust the path as required.