Add rails gem and its dependencies