=Dubious for App Engine See the published demo: http://dubious-demo.appspot.com ===Introducing Dubious This is a web framework written in Mirah geared towards running on App Engine. Dubious provide a way to build apps in Mirah, with conventions familiar to Rails developers. Mirah has no runtime dependencies, everything is compiled ahead-of-time. So, Mirah apps have none of the initialization costs associated with JRuby. Dubious supports ERb and uses a simple datastore adapter that uses a syntax similar to DataMapper. ===Introducing Mirah Mirah is a new language with Ruby-inspired syntax that compiles to JVM bytecode. Mirah is statically typed, with local type inference, and a simple macro system. The goal is to make Mirah as expressive as Ruby without introducing any runtime library and while maintaining Java's level of performance. Just write code that looks like Ruby, but reference the Java docs to find out what method calls to make. Mirah uses the Java type system. Join the mirah mailing list to get involved: http://groups.google.com/group/mirah === Getting Started Since Dubious relies on features of Mirah and Bitescript that have not been released yet, you need to clone the repositories and manually build and install the gems for each of them. #assuming you are in a workspace directory. git clone http://github.com/headius/bitescript.git git clone http://github.com/mirah/mirah.git git clone http://github.com/mirah/dubious.git #assuming your gem and rake commands are from jruby cd bitescript gem build bitescript.gemspec gem install bitescript-* cd ../mirah git checkout 5e98ddab33ee4d581881f7822f8148704426af1a #checkout mirah before the new parser. rake jar:bootstrap gem build mirah.gemspec gem install mirah-* cd ../dubious rake jar #compile the mirah src and put the jar in lib gem build dubious.gemspec gem install dubious-* In the future, you will be able to simply install Dubious as a JRuby gem. That will look like the following: If your gem command is the JRuby one, run gem install dubious * this currently only installs Dubious and not Mirah. If not run jruby -S gem install dubious This will add a `dubious` command that you can create new apps, generate controllers and models etc with. Once dubious is installed, you can generate an app skeleton. dubious new my-app cd my-app ===Directory Layout The layout is based on Rails' with some Java WAR directories, and files geared towards deploying on AppEngine. * WEB-INF/app.yaml contains handlers for different routes. It's like a lightweight version of web.xml--I think it actually generates it http://code.google.com/appengine/docs/python/config/appconfig.html#About_app_yaml ==Hacking on Dubious ===Setup the Mirah development environment Fetch App Engine Java SDK and JRuby, then install them into /usr/local //-included in the gem-* http://googleappengine.googlecode.com/files/appengine-java-sdk-1.3.7.zip * http://jruby.org.s3.amazonaws.com/downloads/1.5.1/jruby-bin-1.5.1.tar.gz Make sure the appengine tools are executable sudo chmod a+x /usr/local/appengine-java-sdk-1.3.7/bin/*.sh Now git clone bitescript, mirah and dubious to your drive mkdir -p ~/mystuff; cd ~/mystuff git clone http://github.com/headius/bitescript.git git clone http://github.com/mirah/mirah.git git clone http://github.com/mirah/dubious.git Edit .bash_profile to find these tools export JRUBY_HOME=/usr/local/jruby-1.5.1 export MIRAH_HOME=~/mystuff/mirah export APPENGINE_JAVA_SDK=/usr/local/appengine-java-sdk-1.3.7 export PATH=$PATH:$JRUBY_HOME/bin:$MIRAH_HOME/bin:$APPENGINE_JAVA_SDK/bin Verify tools are configured properly, and check to see that script/build.sh has the correct path to the SDK. which appcfg.sh which dev_appserver.sh which mirah which jruby After that you should install the appengine-sdk gem jgem install appengine-sdk To build the gem jgem build dubious.gemspec ===Developing your App Install the gem jgem install dubious Generate your app dubious new my-app cd my-app There are two ways to develop the app. The first way is to run the build script each time you make a change. The new way is to use the Rakefile. If you are using jruby's rake, the task will watch for source file changes and update the running class files. Otherwise, you need to restart the server when you have changes. === Use the Original Scripts Compile the Mirah files and populate the WEB-INF/lib dir ./script/build.sh Run the app locally ./script/server.sh Edit the app-id in app.yaml, then publish to appspot.com ./script/publish.sh === Use the New Rakefile Populate the WEB-INF/lib dir ./script/environment.rb Run the app locally jruby -S rake server Edit the app-id in app.yaml, then publish to appspot.com jruby -S rake publish ===Apache License 2.0 http://www.apache.org/licenses/LICENSE-2.0