Giter Club home page Giter Club logo

jruby-enginize's Introduction

JRuby-Enginize

About

JRuby-Enginize is a generator for Google AppEngine compliant JRuby applications. The generator currently supports Sinatra and Merb with more frameworks to come in the future. If you want to learn more about Google AppEngine, go to code.google.com/appengine and have a look at the tutorials. For more about JRuby, please go to www.codehaus.org and see what’s up running Ruby applications on a Java VM.

The Google people work hard to make JRuby easier to deploy with each release of their tools, so don’t blindly trust all those blog posts and samples you’ll find but use the newest version of jruby-enginize and have a look at the Wiki page of the Google AppEngine JRuby tools (code.google.com/p/appengine-jruby/wiki/GettingStarted) to learn about the details beyond.

If you used JRuby-Enginize before, you will note two bigger changes:

  • There is no need for a separate JRuby installation anymore, as the google-appengine gem does that for you.

  • Gem handling changed as Google now uses bundler and all required gems have to be registered in a new file called “Gemfile”. These gems are loaded on the fly when you call “rake appengine:run” or “rake appengine:deploy”. Quite elegant…

Installation

These are the steps for installing the Google tools plus JRuby-Enginize running on top of it to streamline your first steps:

sudo gem sources -a http://gemcutter.org  # Only needed once!
sudo gem install google-appengine
sudo gem install jruby-enginize

!!Warning: As Github cancelled gem support, we moved the gem from Github.com to Gemcutter.org. If you install from Github, you will not get the newest version! See gemcutter.org/gems/jruby-enginize for details.

You also need an Google AppEngine account to actually publish your code. Without account you can still play around with the tools and run applications locally.

Using jruby-enginize

JRuby-Enginize includes is a single executable named jruby-enginize which is inspired by the rails tool for generating Rails applications. So just call

jruby-enginize

and have a look at the options.

Here are the steps for creating and deploying a new Sinatra application:

  • Register with Google AppEngine and create a new application ID.

  • Generate your application with that new ID as directory name and the e-mail address of your Google account. Optionally choose a template (“sinatra” or “merb” for now).

    Sample:

    jruby-enginize --email [email protected] --template sinatra jruby-enginize

  • Go to the new directory

  • Learn about the available rake tasks

    rake --tasks

  • Try out your application locally:

    rake appengine:run

    !!Attention: Whenever you want to require additional gems, be sure to add them to the bundler configuration in Gemfile instead of using jgem as the Google toole maintains a local repository per project and bundle the files to upload from that information.

  • Deploy the application:

    rake appengine:deploy

    The first time you deploy your application, you will be asked for e-mail and password to confirm your upload to the server.

You can repeat the deployment whenever you want. Be sure to set the version number in the AppEngine::Rack.configure_app part of config.ru to a new value, when you are experimenting with an unstable version and don’t want to risk your users getting exceptions.

You can try the new version by opening e.g.

http://3.latest.jruby-enginize.appspot.com

and replacing “3” with the version number you want to run.

Switch the application to the new version as default (stable version) by opening

http://appengine.google.com/deployment?&app_id=jruby-enginize

and setting a new default available at

http://jruby-enginize.appspot.com

A small README with these and a few more application specific hints is generated along with the source code. Have fun.

Copyright & License

Copyright © 2009 Holtzbrinck Digital GmbH, Jan Ulbrich

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

jruby-enginize's People

Stargazers

Jeremy Hulick avatar

Watchers

Jeremy Hulick avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.