views:

637

answers:

2

Early reports of JRuby on Google App Engine indicate that ActiveRecord does not work.

It was my understanding that this was the only way to talk to the database in Rails.

Is this not the case? And, if not, what is the alternative?

Is there a more direct way in Rails of interfacing with Google's BigTable datastore?

+4  A: 

Edit: Looks like somebody created a sample JRuby-Rails application - this should be an easy starting point. Sample code is here.

It appears that there are a few projects being worked on to create App Engine adapters for the DataMapper ORM. This one should work with the current version of DataMapper (0.9.11), and this one requires the 0.10.0 version in development. They're both pretty new (to be expected, given how recently the App Engine Java announcement was made), so I can't vouch for their current quality, of course.

Using DataMapper with Rails requires a bit of extra configuration; see this blog post for more information. This will be made less onerous by Rails 3, which is intended to be ORM agnostic after the merge with Merb. If Rails 2.3 + DataMapper presents problems, one can also consider other Ruby web frameworks (Merb, Sinatra, etc.).

This library may also prove helpful in setting up a JRuby web app on GAE. I haven't tested any of these out, so YMMV.

Greg Campbell
+2  A: 

Try using JRuby on Rails: http://olabini.com/blog/2009/04/jruby-on-rails-on-google-app-engine/

Don Werve