title: Ruby not properly understand what gems are installed when running from Jenkins?
body: <p>I have a Jenkins job that is supposed to run.
  The job description is as follows:<br>
  SVN update the workspace repository<br>
  Run the following Windows batch command "<code>ruby -d tester.rb</code>"  </p>
  
  <p>When I run this command from the command line on the master machine (which is a physical machine in front of me), the script runs no problem</p>
  
  <p>When I run a seperate job that calls "<code>ruby -v</code>", it sees the correct version of ruby.<br>
  When I run a seperate job that calls "<code>gem list</code>", it sees the correct version of ruby.</p>
  
  <p>However when I run the job described at the top, I get errors that none of the gems listed as being installed by "<code>gem list</code>" are installed, and my script does not run.</p>
  
  <p>Can anyone provide a suggestion?</p>
  
  <p>for more information here is code from a run with a bit of a combination of the data:</p>
  
  <hr>
  
  <pre><code>[workspace] $ cmd /c call C:\Windows\TEMP\hudson3791189246243258127.bat
  
  C:\Program Files (x86)\Jenkins\jobs\job1\workspace&gt;ruby -r rubygems -e "p Gem.path" 
  ["C:/Windows/system32/config/systemprofile/.gem/ruby/1.8", "C:/Ruby187/lib/ruby/gems/1.8"]
  
  C:\Program Files (x86)\Jenkins\jobs\job1\workspace&gt;cd .qa_automation\trunk 
  
  C:\Program Files (x86)\Jenkins\jobs\job1\workspace\.qa_automation\trunk&gt;set GEM_HOME=c:\Ruby187\lib\ruby\gems\1.8 
  
  C:\Program Files (x86)\Jenkins\jobs\job1\workspace\.qa_automation\trunk&gt;ruby -d _Tester.rb config\portalconfigPROD.txt compare_IWT_Main_TSS 
  Exception `LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36 - no such file to load -- random_data
  Exception `NoMethodError' at C:/Ruby187/lib/ruby/1.8/rational.rb:78 - undefined method `gcd' for Rational(1, 2):Rational
  Exception `LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36 - no such file to load -- uuidtools
  Exception `NameError' at C:/Ruby187/lib/ruby/gems/1.8/gems/uuidtools-2.1.2/lib/uuidtools/version.rb:25 - uninitialized constant UUID
  Exception `LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36 - no such file to load -- builder
  ./lib/Portal/Session.rb:379: warning: statement not reached
  ./lib/Portal/Session.rb:434: warning: statement not reached
  Exception `LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36 - no such file to load -- selenium-webdriver
  Exception `LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36 - no such file to load -- yajl/json_gem
  Exception `LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60 - no such file to load -- yajl/json_gem
  Exception `LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36 - no such file to load -- json/ext/parser
  Exception `LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60 - no such file to load -- json/ext/parser
  Exception `LoadError' at C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60 - no such file to load -- json/ext/parser
  Using Pure library for JSON.
  _Tester.rb:78: warning: already initialized constant ARGV
  C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.7.0/lib/selenium/webdriver/remote/capabilities.rb:171: warning: method redefined; discarding old proxy=
  C:/Ruby187/lib/ruby/gems/1.8/gems/ffi-1.0.9-x86-mingw32/lib/ffi/struct.rb:225: warning: discarding old align
  Exception `LoadError' at C:/Ruby187/lib/ruby/gems/1.8/gems/ffi-1.0.9-x86-mingw32/lib/ffi/library.rb:133 - LoadError
  Exception `LoadError' at C:/Ruby187/lib/ruby/gems/1.8/gems/ffi-1.0.9-x86-mingw32/lib/ffi/library.rb:133 - LoadError
  </code></pre>