JRuby On Rails

From Stax

Jump to: navigation, search

Note: JRuby on Rails is a self-contained project environment with its own tools for performing project tasks like creating models, controllers and running applications. This self contained design does not use a standard WAR-file layout, so it can't use the standard stax create/run/deploy commands. Instead, the easiest way to work with JRuby on Rails is to create and develop using the normal rails tools, and then export the application as a WAR file that can be deployed to the Stax Cloud using the stax app:deploy command.


From the JRuby Site site:

JRuby is an 100% pure-Java implementation of the Ruby programming language.

From the Ruby on Rails site:

Ruby on Rails is an open-source web framework that's optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration.

Links

Contents

Creating your Rails app

Use the standard JRuby on Rails commands to create you application. Check out this tutorial for Getting Started with JRuby

Connecting Rails to a Stax Database

After creating a Stax database using the Stax appconsole, register it in the database.yml file:

  adapter: jdbc
  driver: com.staxnet.jdbc.Driver
  url: jdbc:stax://STAX_DB_NAME
  username: STAX_DB_USERNAME
  password: STAX_DB_PASSWORD

Packaging your Rails app as a WAR

Warbler provides some tools for exporting your Rails application as a WAR file that can be deployed on WAR-compatible systems like Stax. Check out this tutorial that shows an example of using Warbler.

Deploy to Stax

To deploy your packaged WAR to the Stax cloud, run the stax app:deploy command

stax app:deploy <path_to_war>
Personal tools
Navigation