Hello, Merbists!
Today, I explain how to develop Merb apps that runs on GAE/J environment by using dm-datastore-adapter.
First of all, here is whole source code of an example app. Please check it out.
After checking it out,
you must edit appengine-web.xml file. Open it by editor and change the application name to yours.
And then you should make war directory by typing this command.
1 MERB_ROOT% jruby -S warble war
It generates files under tmp/war.
So far, you are ready to deploy this app to GAE/J
Of course, you need an account of GAE/J to do it. Please get it in advance :-)
Let us go to deploy by this command.
1 MERB_ROOT% appcfg.sh update -e {youraccount@gmail.com} tmp/war
This process takes a time for the first time.
If the log didn't say any errors, you got success!
Now your first Merb app on GAE/J is here at
http://{your app name}.appspot.com/
Congrats!
Further improvement is your home work :-p
APPENDIX
All required gems are being packed into jar file located at lib/merb.jar.
This enables you to pass the limit of which you can upload only 1000 files to GAE.
If you add more gems to the jar file, you can do it like this
- unpacking it
- add gems
- and repack it
Enjoy!