Tuesday May 22, 2007
This blog shows how Mephisto, a web publishing system based on Ruby on Rails, can be deployed on GlassFish V3 with minimal changes. These detailed steps are derived from the original instructions. Here are the exact steps that I followed:
GLASSFISH_HOME/lib' directory. Rename the installation directory
to 'jruby' (lets say JRUBY_HOME).JRUBY_HOME/bin' in your environment PATH.gem install rails -y --no-rdoc
gem install activerecord-jdbc -y --no-rdocJRUBY_HOME/lib' directory.mysqld-nt --user root --console'
in MYSQL_HOME/bin directory on Windows or './bin/mysqld_safe'
from MYSQL_HOME directory on Unix flavors.MYSQL_HOME/bin/mysql -u root
mysql> create database mephisto character set utf8;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on mephisto.* to arun@localhost identified by 'noway';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> quit;
Byemephisto' (lets say
MEPHISTO_HOME) for convenience.MEPHISTO_HOME/config/database.example.yml'
to 'MEPHISTO_HOME/config/database.yml'. Change database entries in the
file from:development:
adapter: mysql
database: mephisto_development
username: root
password:
host: localhostdevelopment:
adapter: jdbc
driver: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/mephisto
username: arun
password: nowayMEPHISTO_HOME/config/environment.rb', add the following
fragment before "Rails::Initializer.run" statement.if RUBY_PLATFORM =~ /java/
require 'rubygems'
RAILS_CONNECTION_ADAPTERS = %w(jdbc)
endrake db:bootstrap' to bootstrap the
development database. On windows, you may have to invoke this
command as 'JRUBY_HOME\bin\jruby.bat JRUBY_HOME\bin\rake
db:bootstrap'.
GLASSFISH_HOME:java -jar lib/glassfish-10.0-SNAPSHOT.jarGLASSFISH_HOME/bin' as:asadmin deploy --path MEPHISTO_HOMEhttp://localhost:8080/mephisto'.

This shows how a Ruby application, with minimal change, can be deployed on GlassFish V3. This was also shown in the JavaOne 2007 Technical keynote (start @ 8:29 and finish @ 10:50).
I encourage you to try other popular Rails applications on GlassFish and leave your feedback here.
Technorati: glassfish mephisto rubyonrails ror jrubyonglassfish
Posted by Arun Gupta in web2.0 | Comments[13]
|
|
|
|
Posted by Nathan Fiedler on May 23, 2007 at 04:54 PM PDT #
Posted by Robert Dempsey on May 27, 2007 at 05:43 PM PDT #
Posted by Arun on May 29, 2007 at 09:32 AM PDT #
Posted by Robert Dempsey on May 29, 2007 at 10:39 AM PDT #
Posted by Arun on May 29, 2007 at 10:44 AM PDT #
Posted by Robert Dempsey on May 29, 2007 at 10:50 AM PDT #
Posted by Nathan's Lame Blog on June 03, 2007 at 12:57 AM PDT #
Posted by Arun Gupta's Blog on August 27, 2007 at 10:35 AM PDT #
Posted by Arun Gupta's Blog on November 15, 2007 at 06:19 AM PST #
Posted by Arun Gupta's Blog on January 05, 2008 at 06:27 AM PST #
Posted by Arun Gupta's Blog on August 28, 2008 at 05:50 AM PDT #
Posted by Arun Gupta's Blog on August 28, 2008 at 05:57 AM PDT #
Posted by Arun Gupta's Blog on September 05, 2008 at 10:19 PM PDT #