From: Gordon Thiesfeld Date: 2009-08-07T06:07:26+09:00 Subject: Re: including gems with standalone app On Thu, Aug 6, 2009 at 3:58 PM, Eric Peterson wrote: > I must have something set up wrong on my box.  Using your code exactly I > still get. > > > C:\InWork\myApp>ruby foo.rb > C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `gem_original_require': no such file to load -- html/table (LoadError) >        from > C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > `require' >        from foo.rb:4 > > > somewhat frustrating.  This should be easier. > > > ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] The one-click installer for that version sets the rubyopt environment variable, so rubygems is getting loaded earlier than we realize. C:\myapp>pik sw 186 mswin == Switching to ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] == C:\myapp>ruby foo.rb
foo bar baz
1 2 3
hello world
C:\myapp>set RUBYOPT=-rubygems C:\myapp>ruby foo.rb c:/ruby/186-p287-mswin32/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- html/table (LoadError) from c:/ruby/186-p287-mswin32/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from foo.rb:5 C:\myapp>set RUBYOPT= C:\myapp>ruby foo.rb
foo bar baz
1 2 3
hello world
Hope that does it.