Forum: JRuby Sqlite on App Engine - Alternative to deleting ActiveRecord?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Chris C. (Guest)
on 2009-06-03 00:48
(Received via mailing list)
In Ola B.'s instructions for JRuby-Rails on App Engine, he recommends
deleting ActiveRecord in order to meet the 1000-file limit.

What I'm wondering is, if I want to use ActiveRecord with a Sqlite
and bypass the Google Datastore, could I do this by deleting some of the
following services instead:

   - actionmailer

   - actionpack

   - activeresource

   - activesupport

Let's assume I have a barebones scaffolded Rails app that just does some
basic CRUD. . .

Which of these services could I not do without?
Joseph A. (Guest)
on 2009-06-03 01:27
(Received via mailing list)
I'm pretty sure you will definitely need ActionPack and ActiveSupport.
does the controller and view work and AS is utility stuff used all
throughout rails.  I think ActionMailer and ActiveResource could be
without, though I don't know how many files each of these parts

Chris C. (Guest)
on 2009-06-03 01:41
(Received via mailing list)
ActionMailer and ActiveResource together only comes to a total of around
files. That would leave me still about 300 files over the limit. So it
like ActiveRecord needs to go, as Ola suggested.

Thanks for the info.
Ted H. (Guest)
on 2009-06-03 02:11
(Received via mailing list)
Hi Chris,

I don't know whether it's feasible to take the stuff in activerecord and
turn them into a jar.  The way that Reggae and the appengine-apis are
up, is to freeze all your gems, stash them into a jar, and that
significantly reduces the number of files in your application.  I
am a Merb/DataMapper user, so i haven't given a Rails setup a go really
(although i have followed along with what Ola's been up to).

There has been some discussion of weird file path issues when jarring up
Rails, but again having not actually set that up, i don't know

That may not be helpful, but perhaps that gets you on the right path.

-Ted (knowtheory)
Chris C. (Guest)
on 2009-06-03 02:21
(Received via mailing list)
Hi Ted

Thanks for the feedback. As you probably know there's not much written
this approach but I've tried out Ola's technique and I have found that
works if you delete ActiveRecord as he recommends. But I thought the
it worked was because of the reduced file count. Even jar'd up I think
everything needs to be under 1000 files, but maybe you're right - maybe
there's something about ActiveRecord that doesn't play well with App
even if you're under the file limit. I'm soon going to find out :)

What I just realized is that after deleting all of the test directories,
down to 855 files. That doesn't leave much room for my app but it's
to develop a simple app without busting the limit. Now I just need to
try it
out and see if it works.

Josh M. (Guest)
on 2009-06-03 02:34
(Received via mailing list)
Hi Chris,
if you jar the rails gems it should work fine check out
 The thousand file limit, in my experience, is just the count of the
in the war directory.  I had an app of over a thousand files and after I
jared up rails it works fine with no hiccups.  So it should work for you

Ted H. (Guest)
on 2009-06-03 04:07
(Received via mailing list)
Hey Chris, Josh,

Josh is correct.  The file limit is # of files on the app engine file
system, not the # in the jars.

Chris C. (Guest)
on 2009-06-03 05:05
(Received via mailing list)
Hi Josh,

This is great. Thanks for pointing out my misunderstanding.

Charles Oliver N. (Guest)
on 2009-06-03 06:41
(Received via mailing list)
Chris C. wrote:
> In Ola B.'s instructions for JRuby-Rails on App Engine, he recommends
> deleting ActiveRecord in order to meet the 1000-file limit.
> What I'm wondering is, if I want to use ActiveRecord with a Sqlite
> database and bypass the Google Datastore, could I do this by deleting
> some of the following services instead:

I think you're stuck right here...the problem is that all the JRuby
ActiveRecord backends are based on SQL APIs that are not available on
AppEngine. So I think you may be dead in the water with this approach.

I think your best bet is certainly going to be to go with DataMapper
atop Google's persistence APIs.

- Charlie

To unsubscribe from this list, please visit:
Chris C. (Guest)
on 2009-06-03 09:58
(Received via mailing list)
Hi Charlie

Thanks for responding.

I've been flailing around for a few hours trying to get this to work
success. I was going to try it again tomorrow but what I'm hearing from
is that this goes beyond the "file count" limit and has to do with a
incompatibility between ActiveRecord/Sqlite and App Engine. I was hoping
that I could use a bundled sqlite3 database and pretend that the Google
Datastore didn't exist. Oh well.

In that case I'll save the effort and use the recommended approach
When you say Datamapper, I assume you mean Genki Takiuchi's

My understanding was that Datamapper itself won't work with App Engine
version 0.10.

Thanks for setting me straight - this will save me from wasting a lot of


On Tue, Jun 2, 2009 at 10:41 PM, Charles Oliver N. <
Ted H. (Guest)
on 2009-06-03 16:25
(Received via mailing list)

I've realized that unfortunately you're not going to be able to use
databases either.  I've just remembered that AppEngine doesn't allow you
write to the file system, so even if you do have an sqlite database, and
sqlite jdbc drivers or whatever, you won't be able to alter your

I've not tried out Genki's adapter, although i've talked with him
about it once.

My strong preference and recommendation is to use Ryan B.'s
appengine-apis and his dm-appengine adapter ( they're both available as gems
well currently named 'appengine-apis' and 'dm-appengine').  Genki's
is an 0.9.x adapter, and there are a number of changes that adapters
need to
go through to work with 0.10.  Ryan's adapter is an 0.10 adapter.
DataMapper 0.10 is very soon to drop (i'm hoping next week, but it
on dkubb!)

Ryan, additionally, is a member of google's appengine team, so i take
code to be a bit more on the authoritative side.  The appengine-apis
a thin ruby wrapper to the Java Appengine APIs in such a way that you
test against them, and run them on the local dev server and the like.
Ryan's dm-appengine is an abstraction layer on top of his api wrapper,
means that you can additionally test your code locally w/ his appengine
adapter, and again, run them against the jetty dev server that google
provides in the sdk.  As far as i am aware genki doesn't provide any
promises that his adapter will run locally.

I should add that there's more info/work on this coming down the pipe.
been talking with a Ryan and another googler (John Woodell) and we've
some ideas as to how to make setup and deployment w/ appengine a little
more ruby like.  Only thing is, that i'm waiting on dm 0.10 and the
Jars gems that we depend on to be released before i can write a tutorial
that can be used by anyone.

I personally use the appengine-apis gem and the dm-appengine adapter,
with a lib that i put together called reggae (Ruby Enabled GooGle App
Engine ).  Reggae actually wraps all the
of the java sdk that the appengine-apis need to use, and provides access
the jetty dev server, and (soon) the upload and app configuration tools
google includes in the sdk.

Eventually the goal is to have something as stupid simple as

merb-gen app your-app-name
reggae upload your-app-name
[enter your account and password]

(most likely there will be an "edit your to provide metadata"
inbetween those two steps)

Hope that helps!

-Ted (knowtheory)
Chris C. (Guest)
on 2009-06-03 22:33
(Received via mailing list)

Thanks for the suggestion. I've been trying to get appengine-apis to
since reading your response.

Do you know if there is any documentation on setting Rails up with
appengine-apis and deploying to App Engine?

Only Merb seems to be documented on the wiki:

I found this walk-through but couldn't get it to work:
Perhaps it worked specifically for the sample app mentioned. Hasn't
with my skeleton Rails app so far. Or maybe some key instruction was
accidentally omitted from the writeup.

Hopefully Reggae will simplify this whole process. There are quite a lot
hoops to jump through at the moment :)

Regards & Thanks,
This topic is locked and can not be replied to.