views:

110

answers:

1

I want to install a GC Patched Ruby to do a memory profiling on my app. I followed the instructions at http://guides.rubyonrails.org/performance_testing.html#gc and installed a ruby instance at my home dir (I already have another "official" instance for development). This GC Patched ruby instance is working fine.

The problem is when I need to install gems to this instance, as the step 1.8.6 from the guide above tell me to do. I can't use the install of rubygems already on my machine, because it is pointing to other ruby instance. And I wasn't able to install another instance of rubygems just to my gc patched ruby.

That's why I want to know the right way to install rubygems on a GC patched ruby, in a machine that already have another install of non patched ruby.

+2  A: 

You need to set your GEM_HOME and GEM_PATH environment variables to point to the directory you would like ruby to pull the gems from.

Also make sure the patched ruby binary appears before the other version in your PATH environment variable to ensure its picking up the correct version.

Lolindrath