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
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel