[MacRuby-devel] [MacRuby] Require RubyGems quesions

Alexander v. Below below at mac.com
Wed Aug 18 17:28:52 PDT 2010


Hello,

would you point me to the trac site, and I will gladly do so.

Any workaround for the meantime :( ?

Thanks

Alex

Am 19.08.2010 um 02:11 schrieb Laurent Sansonetti:

> Hi Alexander,
> 
> This may be a load path issue. Could you open a ticket on trac? We will investigate.
> 
> Laurent
> 
> On Aug 18, 2010, at 3:53 AM, Alexander v. Below wrote:
> 
>> Hello,
>> 
>> I have a MacRuby script which, among other things, requires rubygems.
>> 
>> It works very nice when I call it in the terminal (i.e. "macruby test.rb"), but when I try to execute it in a Cocoa App using [[MacRuby sharedRuntime] evaluateFileAtPath:path];, I get a LoadError exception: /Users/below/dev/build/Debug/(eval):1:in `<main>': no such file to load -- rubygems (LoadError)
>> 
>> How can I remedy this, and make rubygems known to the script running in my app?
>> 
>> Thanks
>> 
>> Alex
>> 
>> 
>> 1) The issue is reproducible with this scrip, suggested by a user on this list. Thanks again:
>> 
>> require 'rubygems'
>> require 'control_tower'
>> require 'rack/utils'
>> 
>> server_options = { :port => 3001, :host => '0.0.0.0', :concurrent => false }
>> 
>> app = Rack::Builder.new do
>> map "/" do run Rack::File.new("/Users/below/Sites/") end
>> end.to_app
>> 
>> @s = ControlTower::Server.new(app, server_options)
>> if @s
>> puts 'Starting control tower webserver'
>> @s.start
>> else
>> puts "ERROR: Couldnt build server"
>> end
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



More information about the MacRuby-devel mailing list