Skip to content

Instantly share code, notes, and snippets.

@iamvery
Created January 14, 2011 20:31
Show Gist options
  • Save iamvery/780178 to your computer and use it in GitHub Desktop.
Save iamvery/780178 to your computer and use it in GitHub Desktop.
This actually should probably belong at the top of your config.ru file. The purpose is to change the GEM_HOME environment variable and then tell RubyGems to look there for gems for now on.
# Specify your own GEM_HOME, but keep the standard gem path in GEM_PATH
ENV['GEM_HOME'] = "#{ENV['HOME']}/.gems"
ENV['GEM_PATH'] = "#{ENV['GEM_HOME']}:/usr/lib/ruby/gems/1.8"
require 'rubygems'
Gem.clear_paths
@iamvery
Copy link
Author

iamvery commented Jan 14, 2011

This was critical for me when I was trying to deploy a Rails 3 app on a Dreamhost shared server. http://discussion.dreamhost.com/thread-128599.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment