Hi! Welcome to the MacRuby world ;-).
I imagine you are running MacRuby 0.5 on your machine, seeing the paths you include in your .rb file? Why are you doing all those includes by the way? All the necessary paths will be in MacRuby's default path. As for the "Bad Request", do you get any error log or anything? I cannot reproduce here because webrick is broken with current trunk: /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/lib/ruby/1.9.0/webrick/httpauth/htpasswd.rb:38: regexp `:{SHA} 'compilation error: U_REGEX_BAD_INTERVAL 2010-04-27 11:30:40.648 RubyTest[38472:5807] SyntaxError: /private/tmp/RubyTest/build/Debug/(eval):17:in `<main>': compile error (SyntaxError) I don't know what is our take on fixing webrick but the current problem is that our Regex library doesn't know the {SHA} regex rule. Maybe we can add it? I don't know, Laurent or Vincent would know better than me on that one :-). As for running the script, it depends on what you intend to do with it actually. The solution would depend on the end usage :-) -- Thibault Martin-Lagardette On Apr 27, 2010, at 06:34, Alexander von Below wrote: > Hello, > > I am new to MacRuby, and new to this list, so first a "Hello"! > > Secondly, I am trying to start a simple WEBrick in a Ruby App. The WEBrick > code is a sample from a book, and runs fine if started on its own. > > But when I evaluate the file in MacRuby within my Cocoa App, a call to > http://localhost:2000/hello yields "Bad Request". > > Furthermore (as to be expected), the script does not return. I am happy > creating a separate thread for the Ruby Evaluation in my Cocoa App, but is > there a better way? > > My sample project is hosted here: http://github.com/below/RubyTest > > I would be very thankful if someone could have a look (and I am sure others > will find this useful information, too) > > Thanks a lot! > > Alex > _______________________________________________ > MacRuby-devel mailing list > MacRuby-devel@lists.macosforge.org > http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel