I was trying to get Ola's App Engine "yarbl" sample running in Netbeans which comes bundled with JRuby 1.1.4 and Ruby on Rails 2.0.2 running on Glassfish version 3. Since Ola's project requires the latest version of JRuby, I tried to configure Netbeans to use JRuby 1.20 to run the "yarbl" project. Whenever I ran the project, Netbeans fell back to using the default built-in JRuby 1.1.4 instead of 1.20. This seems to be because Glassfish works only with its bundled JRuby 1.1.4. If anyone has been able to get "yarbl" working on Windows: If not Nebeans, which IDE are you using for local development and testing? If not Glassfish, which Java application server are you using for deployment?
on 2009-04-25 19:41
on 2009-04-25 21:07
You should use the App Engine dev_appserver to run an App Engine app locally. I don't know about Netbeans, but I was able to get yarbl running in eclipse: Download yarbl and run [jruby -S warble] (you'll need to install the warbler gem if you don't have it). I had to create a "log" directory for warbler to run. When it's done it will leave a directory called "war" in tmp, which is what dev_appserver needs. If you don't have it, install the App Engine plugin for Eclipse: http://code.google.com/appengine/docs/java/tools/e... Now create a new Web Application Project. Make up some package name for it, and uncheck the box to use GWT. If you look at this project you'll see it has a war directory. Copy all the files from yarbl/tmp/war into the eclipse war directory. I also had to delete the indexes xml file from war/WEB-INF before the app would run. After you've done this, you can select your project and do Run As -> Web Application. You can now work within the war folder, although things are a bit inside out from your typical rails app. All the files that are normally in public/ are in war/. All your code is in war/WEB-INF You'll probably also want to install the RDT: http://rubyeclipse.sourceforge.net/ -- Ryan Brown
on 2009-04-25 22:51
Ryan, I got it working thanks to your excellent instructions. Thanks so much for spelling everything out in detail. The dummies approach is exactly what I needed (i.e. creating the 'log' directory and deleting the database_indexes.xml in the WEB-INF folder). Not sure if you have encountered any problems with warble. Since you didn't mention it, I thought I should. Although it worked eventually, various errors appeared randomly and then went away: cp tmp tmp/war/WEB-INF/tmp rake aborted! Permission denied - Permission denied - tmp C:/JRuby120/bin/../lib/ruby/1.8/fileutils.rb:1261:in `open' (See full trace by running task with --trace) The other one was: mkdir -p tmp/war/WEB-INF jar cf yarbl.war -C tmp/war . rake aborted! private method `split' called for nil:NilClass C:/JRuby120/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/repaired_system.rb: 109:in `find_runnable' Not sure if I should be worried about that for the future but warble's behavior does seem unpredictable. I tried two ways of invoking it. The first - as you suggested - was "jruby -S warble". The second was to install the ruby gem (not JRuby gem) and invoke simply as "warble" inside the yarbl folder. In both cases I got the errors listed above. And then subsequently I didn't get them any more after repeating the command several times. Very strange. Anyway, you made my day, Ryan. I had been struggling to figure out why I couldn't get it working in Netbeans. Thanks! I'm excited about getting some code up on App Engine. This is great.