Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

BitNami's JRubyStack = JRuby + Rails + GlassFish Gem + MySQL all bundled together

DZone's Guide to

BitNami's JRubyStack = JRuby + Rails + GlassFish Gem + MySQL all bundled together

· Database Zone
Free Resource

Check out the IT Market Clock report for recommendations on how to consolidate and replace legacy databases. Brought to you in partnership with MariaDB.

BitNami provides easy-to-use, integrated and multiplatform install bundles for different open source apps. They released JRubyStack last week which includes JRuby 1.1 RC2, Rails 2.0.2, GlassFish v3 Gem 0.1.1, MySQL 5.0.45 and some other miscellaneous components. The components mentioned here are all you need to get started with hosting your JRuby-on-Rails applications on GlassFish. Refer to release notes for more details.

 

The steps below walks you through installation of JRubyStack. It shows how this stack provides an integrated and ready-to-use bundle for hosting your applications on GlassFish:

  1. Install JRubyStack
    1. Download JRubyStack from here. Click on the installer to see:

    2. Clicking on "Next >" brings the following screen:



      Even though it shows "JRuby on Rails" component but it includes everything, including GlassFish v3 Gem & MySQL server, in it.
    3. Further in the installation process, change the database user name from default "jrubystack" to "root". Take all other defaults through out the installation process.
    4. After the installation is completed, the following program menu is added

  2. After the bundle is installed, it's ready to use - MySQL server is started, a default application is created in "C:\Users\Arun Gupta\BitNami JRubyStack projects\jrubystack" and hosted using GlassFish v3 gem at "http://localhost:3000". Here is the output shown in the console window started by JRubyStack:

    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Init service : com.sun.enterprise.v3.services.impl.CmdLineParamProcessor@1d9e5ad
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Init service : com.sun.enterprise.v3.server.SystemTasks@33c3e6
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Init service : com.sun.enterprise.v3.services.impl.LogManagerService@1b70f9e
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Init service : com.sun.enterprise.v3.services.impl.HouseKeeper@666d83
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.services.impl.DeploymentService postConstruct
    INFO: Supported containers : web,jruby,phobos
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Startup service : Deployment
    Mar 10, 2008 2:49:26 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Startup service : org.glassfish.deployment.autodeploy.AutoDeployService@15925c0
    Mar 10, 2008 2:49:27 PM com.sun.enterprise.v3.services.impl.GrizzlyAdapter <init>
    INFO: Listening on port 3000
    Mar 10, 2008 2:49:27 PM com.sun.enterprise.v3.services.impl.GrizzlyAdapter <init>
    INFO: Listening on port 3131
    Mar 10, 2008 2:49:27 PM com.sun.enterprise.v3.services.impl.GrizzlyAdapter <init>
    INFO: Listening on port 3838
    Mar 10, 2008 2:49:27 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Startup service : com.sun.enterprise.v3.services.impl.GrizzlyService@eccfe7
    Mar 10, 2008 2:49:28 PM com.sun.grizzly.standalone.StaticResourcesAdapter <init>
    INFO: New Servicing page from: C:\Users\Arun Gupta\BitNami JRubyStack projects\jrubystack\public
    Mar 10, 2008 2:49:28 PM com.sun.enterprise.rails.RailsDeployer load
    INFO: Loading application . at /
    Starting Rails instances
    Mar 10, 2008 2:49:58 PM com.sun.grizzly.jruby.RubyObjectPool$1 run
    INFO: Rails instance instantiation took : 30451ms
    Mar 10, 2008 2:49:58 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Startup service : Application Loader
    Mar 10, 2008 2:49:58 PM com.sun.enterprise.v3.server.AppServerStartup run
    INFO: Glassfish v3 started in 32229 ms

Now you have a template app that can be used to experiment with different features of GlassFish Gem. A similar bundle can be easily hand-crafted using the steps described here.

More details about GlassFish and JRuby can be found @ GlassFish wiki and JRuby wiki. Help us test your application on the v3 gem and file issues in JIRA or GlassFish Issue Tracker.

Please use the gem and send us feedback on GlassFish forums, dev@glassfish or gem mailing list.

Interested in reducing database costs by moving from Oracle Enterprise to open source subscription?  Read the total cost of ownership (TCO) analysis. Brought to you in partnership with MariaDB.

Topics:

Published at DZone with permission of Arun Gupta, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}