There's a great trick mentioned on the Riding Rails weblog for "freezing" gems into a Rails application (so your application carries its own version of Rails around with it, and won't be affected by upgrades to Rails on a shared host). The trick is to run the command:
rake freeze_gems
in the root of your application. This unpacks the current gems into the vendor/rails directory. Your application will detect the presence of these local, unpacked gems and use them instead of the main system Rails gems.
Comments
Great! How do I freeze non-rails gems?
Great! How do I freeze non-rails gems?
Freeze Other Gems Task
You can use Freeze Other Gems
http://nubyonrails.com/articles/2005/12/22/freeze-other-gems-to-rails-li...
Thanks
Thanks Rafael. I came across that myself after I replied to the comment. However, the reason I remain wary is that the comments mention a few issues, and you need to do some manual work to get the task to work (i.e. setting up references to the gems you're using). But better to have an OK solution than no solution at all.
Er...not sure you can. What
Er...not sure you can. What you could do (if it was really, really important) would be to put the content of the gem into your application somewhere where Rails could see it. For example, you could put any required .rb files inside the lib directory. Or you could unpack the gem into a non-standard directory inside your Rails app., and get Rails to load it by adding a custom load path to environment.rb. Finally, you could create a plugin which initialises all the required libraries (this is what I've done with libraries I use for s33r, my S3 Rails client).
Hope this helps.