¶ ↑
Dubious for App EngineSee the published demo: dubious-demo.appspot.com
¶ ↑
Introducing DubiousThis is s starter project for Duby on App Engine. Dubious provide a way to build apps in Duby, with conventions familiar to Rails and Sinatra developers. Duby has no runtime dependencies, everything is compiled ahead-of-time. Duby apps have none of the initialization costs associated with JRuby. Dubious supports ERb and has a simple datastore adapter that uses a syntax similar to DataMapper, but the form and tag helpers are currently missing.
¶ ↑
Introducing DubyDuby is a new language with Ruby-inspired syntax that compiles to JVM bytecode. Duby is statically typed, with local type inference, and a simple macro system. The goal is to make Duby 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. Duby uses the Java type system. Join the duby-dev mailing list to get involved: kenai.com/projects/duby/lists/dev/archive
¶ ↑
Setup the Duby development environmentFetch App Engine Java SDK and JRuby, then install them into /usr/local
-
googleappengine.googlecode.com/files/appengine-java-sdk-1.3.5.zip
-
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.5/bin/*.sh
Now git clone bitescript and duby to your drive
mkdir -p ~/mystuff; cd ~/mystuff git clone http://github.com/headius/duby.git git clone http://github.com/headius/bitescript.git
Edit .bash_profile to find these tools
export JRUBY_HOME=/usr/local/jruby-1.5.1 export DUBY_HOME=~/mystuff/duby export APPENGINE_JAVA_SDK=/usr/local/appengine-java-sdk-1.3.5 export PATH=$PATH:$JRUBY_HOME/bin:$DUBY_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 duby which jruby
¶ ↑
Developing your AppWhen you create a new Duby file, you needs to add it the the build script Run the build script whenever you modify a Duby or ERb file.
./script/build.sh
Now run the app locally
./script/server.sh
Edit the app-id in app.yaml, then publish to appspot.com
./script/publish.sh