views:

425

answers:

3

I have a rails-app (2.3.2) that I need to install on a server on which rake isn't installed, and on which I haven't got privileges to install gems, so I'd like to freeze the rails gem.

However, I can't figure out how to do that. I've put it in the dependencies in environment.rb, but "rake gems:unpack GEM=rake" has no effect. "rake gems" says rake's a framework gem, not a frozen gem.

How do I make sure rake turns up in my "vendor/gems", and how do I tell capistrano to use that version of rake?

A: 

Perhaps this can help you out?

http://gemsonrails.rubyforge.org/

Maran
+1  A: 

Freezing the gem itself is fairly straightforward - if Maran's solution won't work for you, you can create an actual gem repository in your vendor directory and then do gem install rake --install-dir /rails_dir/vendor/gems.

The harder part is telling Capistrano which rake to use. Can you post a little more detail on what you want to do with rake and Capistrano?

Sarah Mei
+1  A: 

This is what you want:

set :rake, "/path/to/rake"
Bob Aman