Saturday September 27, 2008
LOTD #9: Advantages of JRuby over MRI
Andreas blogged about why he likes
JRuby even though he dislikes Java.
JRuby is "It's just
Ruby" with more than 50,000 tests to ensure MRI compliance. The blog
highlights that there is no need to know Java, at all, to run JRuby.
Here are
some advantages that are described in the blog:
Posted by Arun Gupta in web2.0 | Comments[0]
|
|
|
|
Tuesday September 23, 2008
LOTD #9: Slides for Deploying and Monitoring Ruby on Rails Tutorial @ Rails Conf Europe 2008
During Rails
Conf Europe 2008
Day 1 I attended an excellent tutorial on Deploying
and Monitoring Ruby on Rails. The session very clearly
explained the several deployment options with Rails. My notes from the
session are here
and the slides are now available.
Here are couple of snapshots from the slide:


The complete set of slides from Rails Conf Europe 2008 are available here.
Technorati: conf
railsconf
glassfish
deployment
rubyonrails
berlin
Posted by Arun Gupta in web2.0 | Comments[0]
|
|
|
|
Thursday September 11, 2008
Kenai - High Throughput and Scalable Rails on GlassFish
![]() |
Kenai (pronounced 'keen-eye') is a fictional character from Disney's Brother Bear series. It's also a river, mountain range, national park, peninsula and a city in the southern coast of Alaska in the United States. But that's got nothing to do (as much as I know) with either Rails or GlassFish. |
![]() |
![]() |
But Project Kenai was announced last week. It's a developer hub with SCM, issue tracking, forums and similar stuff you need for hosting your open source projects. And it is a Rails application deployed on GlassFish v2. |
Posted by Arun Gupta in web2.0 | Comments[0]
|
|
|
|
Monday September 08, 2008
TOTD #44: JDBC Connection Pooling for Rails on GlassFish v3
TOTD
#9 explained how to configure JDBC connection pooling for
Rails application deployed on GlassFish v2. There are several
benefits of using using the JDBC connection pools:
| ~/samples/jruby >~/tools/jruby-1.1.3/bin/jruby -S
rails
jndi_rails2 -d mysql ~/samples/jruby/jndi_rails2 >~/tools/jruby-1.1.3/bin/jruby script/generate scaffold runner miles:float minutes:integer ~/samples/jruby/jndi_rails2 >~/tools/jruby-1.1.3/bin/jruby -S rake db:create ~/samples/jruby/jndi_rails2 >~/tools/jruby-1.1.3/bin/jruby -S rake db:migrate |
| ~/samples/jruby/jndi_rails2 >~/tools/jruby-1.1.3/bin/jruby -S gem install activerecord-jdbcmysql-adapter |
| ~/samples/jruby/jndi_rails2 >sudo cp ~/tools/mysql-connector-java-5.1.6/mysql-connector-java-5.1.6-bin.jar /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/lib/ext |
| ~/tools/glassfish/v3/b23/glassfishv3-prelude/glassfish >java -Xmx512m -DJRUBY_HOME=/Users/arungupta/tools/jruby-1.1.3 -jar modules/glassfish-10.0-SNAPSHOT.jar |
| ~/samples/jruby/jndi_rails2 >~/tools/glassfish/v3/b23/glassfishv3-prelude/glassfish/bin/asadmin create-jdbc-connection-pool --datasourceclassname com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource --restype javax.sql.DataSource --property "User=duke:Password=duke:URL=jdbc\:mysql\://localhost/jndi_rails2_production" jdbc/jndi_rails2_pool |
| ~/samples/jruby/jndi_rails2 >~/tools/glassfish/v3/b23/glassfishv3-prelude/glassfish/bin/asadmin create-jdbc-resource --connectionpoolid jdbc/jndi_rails2_pool jdbc/jndi_rails2 |
| ~/samples/jruby >~/tools/glassfish/v3/b23/glassfishv3-prelude/glassfish/bin/asadmin ping-connection-pool jdbc/jndi_rails2_pool |
|
development: adapter: jdbc jndi: jdbc/jndi_rails2 driver: com.mysql.jdbc.Driver |
| ~/samples/jruby >~/tools/glassfish/v3/b22/glassfishv3-prelude/glassfish/bin/asadmin deploy jndi_rails2 |
Posted by Arun Gupta in web2.0 | Comments[7]
|
|
|
|
Monday September 01, 2008
Rails Conf Europe 2008 and Bratwurst-on-Rails
I arrived Berlin yesterday on a non-adventurous United flight from San
Francisco, just the way I like it! The flight from Frankfurt was
delayed 30 minutes but that's normal these days :)
The venue of RailsConf
Europe 2008 is same
as last year so street names/geography are somewhat familiar.
But the conference
hotel was sold out so am instead staying across the street.
Visited Brandenburger
Tor for a short duration after checking into the hotel. Also
stopped by the Peugeot showroom on Unter
den Linden and saw popular bear figurines in a side street.
The evening ended with a social gathering celebrating the popular
German
culture of Bratwurst-on-Rails.
It's always exciting to meet my blog readers, thank you! Let me know if
I'm missing any of your expectations.
The tutorial starts today and the conference starts tomorrow. If you
are in Berlin, don't forget to attend the joint JUG
and TU-Berlin talk. And my talk on "Rails
powered by GlassFish" is scheduled on Thursday, Sep 4 @
1:40pm.
The evening really eneded with a 40 minutes run and dinner in room
service. The Jolly
Hotel
is really nice, newer rooms, courteous staff, delicious and very neatly
prepared Club Chicken
sandwich and prompt room service, definitely a good recommendation.
However the fitness center is minimal with one ultra-loud
treadmill and 3 other basic machines. The hotel staff informed that
they are working on furnishing the fitness center (known as Wellness
Center here). And there is only one American
channel which is only talking about Storm
Gustav and Republican
National Convetion, Juno
of Juneau since my arrival :(
Anyway, enjoy the pictures so far!
Friday August 29, 2008
FREE Ticket to Rails Conf Europe 2008
Are you a Start up company interested in jump starting and meets the
following criteria ?
|
![]() |
Posted by Arun Gupta in web2.0 | Comments[1]
|
|
|
|
Thursday August 28, 2008
Typo on GlassFish v3 - Ruby-on-Rails Blogging Engine
![]() |
Typo is an open-source Blogging Engine written using Ruby-on-Rails framework. It provides a lean engine that makes blogging easy. It's main attribtues are ease of use, usability, beauty and excellent support of web standards. |
| JRuby
limited openssl loaded. gem install jruby-openssl for full support. http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL Building native extensions. This could take a while... /Users/arungupta/tools/rails20/jruby-1.1.3/lib/ruby/1.8/mkmf.rb:7: JRuby does not support native extensions. Check wiki.jruby.org for alternatives. (NotImplementedError) from /Users/arungupta/tools/rails20/jruby-1.1.3/lib/ruby/1.8/mkmf.rb:1:in `require' from extconf.rb:1 ERROR: Error installing typo: ERROR: Failed to build gem native extension. /Users/arungupta/tools/rails20/jruby-1.1.3/bin/jruby extconf.rb install typo Gem files will remain installed in /Users/arungupta/tools/rails20/jruby-1.1.3/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection. Results logged to /Users/arungupta/tools/rails20/jruby-1.1.3/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out |
| ~/samples/jruby
>unzip
~/Downloads/typo-5.1.2.zip Archive: /Users/arungupta/Downloads/typo-5.1.2.zip creating: typo-5.1.2/ creating: typo-5.1.2/app/ creating: typo-5.1.2/app/apis/ . . . inflating: typo-5.1.2/vendor/uuidtools/lib/uuidtools.rb inflating: typo-5.1.2/vendor/uuidtools/rakefile inflating: typo-5.1.2/vendor/uuidtools/README |
| ~/samples/jruby >sudo mysqladmin create typo_dev |
| ~/samples/jruby/typo-5.1.2
>~/tools/rails20/jruby-1.1.3/bin/jruby
-S rake db:migrate (in /Users/arungupta/samples/jruby/typo-5.1.2) == 1 InitialSchema: migrating ================================================= -- create_table(:users) -> 0.0377s -- create_table(:articles) -> 0.0189s -- add_index(:articles, :permalink) -> 0.0094s -- create_table(:categories) -> 0.0069s . . . == 69 AddModulesToProfile: migrating ========================================== -- add_column(:profiles, :modules, :text) -> 0.0072s == 69 AddModulesToProfile: migrated (0.0454s) ================================= == 70 AddUsersToNonAdmins: migrating ========================================== == 70 AddUsersToNonAdmins: migrated (0.0488s) ================================= |
| ~/tools/glassfish/v3/8-24
>unzip
~/Downloads/glassfish-snapshot-v3-prelude-08_24_2008.zip Archive: /Users/arungupta/Downloads/glassfish-snapshot-v3-prelude-08_24_2008.zip creating: glassfish/ creating: glassfish/docs/ creating: glassfish/docs/css/ creating: glassfish/docs/graphics/ . . . inflating: glassfish/lib/templates/login.conf inflating: glassfish/lib/templates/profile.properties inflating: glassfish/lib/templates/server.policy |
| ~/tools/glassfish/v3/8-24/glassfish
>java
-DJRUBY_HOME=/Users/arungupta/tools/rails20/jruby-1.1.3 -jar
modules/glassfish-10.0-SNAPSHOT.jar Aug 26, 2008 5:56:10 PM com.sun.enterprise.glassfish.bootstrap.ASMain main INFO: Launching GlassFish on Apache Felix OSGi platform Welcome to Felix. ================= Aug 26, 2008 5:56:11 PM HK2Main start INFO: contextRootDir = /Users/arungupta/tools/glassfish/v3/8-24/glassfish/modules Aug 26, 2008 5:56:11 PM OSGiFactoryImpl initialize . . . INFO: APIClassLoader = Class Loader for Bundle [GlassFish-Application-Common-Module [66] ] Aug 26, 2008 5:56:13 PM CommonClassLoaderManager Skipping creation of CommonClassLoader as there are no libraries available INFO: urls = [] Aug 26, 2008 5:56:13 PM com.sun.enterprise.v3.server.AppServerStartup run INFO: Glassfish v3 started in 2176 ms |
| ~/samples/jruby >~/tools/glassfish/v3/8-24/glassfish/bin/asadmin
deploy typo-5.1.2 Command deploy executed successfully. |







Posted by Arun Gupta in web2.0 | Comments[1]
|
|
|
|
Wednesday August 27, 2008
Interested in a 30 second promotion in Rails Conf Europe 2008 ?
|
Are
you deploying Rails
application on GlassFish
in any manner (WAR-based, Gem or Technology Preview 2) ? Are you using Rails and GlassFish combination in a creative way ? Having you been following Rails/GlassFish development/deployment options and have an opinion ? |
Posted by Arun Gupta in web2.0 | Comments[2]
|
|
|
|
Tuesday August 26, 2008
LOTD #6: Rails Deployment on GlassFish in 4 steps and 15 minutes
Charlie describes,
in 4 easy steps, how to deploy any Rails
application on GlassFish:

The main steps are:
Step 1: The App Server
Step 2: Package your App
Step 3: Deploy your application
Step 4: Tweaking (Optional)
And it should only take 15 minutes on GlassFish v2!
The conclusion of the blog is:
Hopefully
this walkthrough clears up some confusion around JRuby on Rails
deployment to an app server. It's really a simple process, despite the
not-so-simple history surrounding Enterprise Application Servers, and
GlassFish almost makes it fun :)
The next version, GlassFish
v3, allows Rails application to be deployed natively, i.e. no
packaging is required. You create a Rails application and run it - just
the way you are used to! Read all about it here.
All previous entries in this series are archived at LOTD.
Technorati: lotd
rubyonrails
jruby ruby glassfish
Posted by Arun Gupta in web2.0 | Comments[1]
|
|
|
|
Friday August 22, 2008
GlassFish @ Berlin-Brandenburg JUG and TU Berlin
![]() |
I'll be providing an overview of GlassFish - engineering update on v2 and v3, adoption & success stories, and the vibrant community around it at a joint Berlin-Brandenburg JUG and TU-Berlin meet on Sep 3, 2008. | ![]() |
Posted by Arun Gupta in web2.0 | Comments[3]
|
|
|
|
Thursday August 21, 2008
LOTD #4: Rails running on GlassFish @ LinkedIn
Light Engineering team (BumperSticker
fame)
at LinkedIn has
chosen GlassFish
for running their Rails
application. One of the developers on the
team reports:
Using Warbler, we
successfully wrapped our Rails applications into WAR files and deployed
on Glassfish (we’ll probably write a more detailed tutorial of this at
a future date). A WAR file is completely self contained application
that can be deployed simply by copying to an autodeploy directory. No
more Apache/Nginx reverse proxy, no more Capistrano, no more installing
gems on a production container, no more of any of that madness. This
was a huge win, and we broke out the champagne bottles.
Read the complete entry at:
JDBC
Connection Pooling for Rails on GlassFish
Stay tuned for more details!
NetBeans
development and GlassFish
deployment already provide an ideal
environment for Rails deployment. You can read about
successful deployments of Rails and GlassFish here.
All previous entries in this series are archived at LOTD.
Technorati: lotd
rubyonrails
jruby ruby netbeans
glassfish
stories
Posted by Arun Gupta in web2.0 | Comments[0]
|
|
|
|
Tuesday August 19, 2008
Jacob Kessler
is a new
hire in GlassFish
Scripting team and is blogging, welcome Jacob!
Read
how he will apply Aritificial Intelligence prinicples for dynamic
configuration of JRuby runtime pools in GlassFish :)
Technorati: glassfish
rubyonrails
dynamiclanguages
Posted by Arun Gupta in General | Comments[0]
|
|
|
|
LOTD #3: Rails 2.2 going multi-threaded
Rails 2.2 is
slated to become
multi-threaded. What does it mean for
JRuby users ? Charles Nutter explains it:
Q/A:
What Thread-Safe Rails Means
One of the key points from the blog is:
Rails deployments on
JRuby will use 1/Nth the amount of memory they use
now, where N is the number of thread-unsafe Rails instances currently
required to handle concurrent requests. Even compared to green-threaded
implementations running thread-safe Rails, it willl likely use 1/Mth
the memory where M is the number of cores, since it can parallelize
happily across cores with only "one" instance.
NetBeans
development and GlassFish
deployment already provide an ideal
environment for Rails deployment.
All previous entries in this series are archived at LOTD.
Technorati: lotd
rubyonrails
jruby ruby netbeans
glassfish
Posted by Arun Gupta in web2.0 | Comments[0]
|
|
|
|
Thursday August 14, 2008
GlassFish @ Rails Conf Europe 2008

Sun Microsystems is a diamond sponsor of Rails Conf
Europe 2008 and we'll be there!
Here is the list of Sun sessions:
Posted by Arun Gupta in web2.0 | Comments[2]
|
|
|
|
Tuesday August 05, 2008
JRuby on GlassFish v2 - screencast from community
Here is a (year old) community contributed video showing how to deploy
a Ruby-on-Rails
application on GlassFish v2
application server:
The presenter is not speaking and typing really fast, I wish there was
a slower playback available :)
Anyway, thanks to Angsuman for the tip!
Screencast
#Web9 shows how to deploy a Rails application as WAR in
GlassFish v2. Some other relevant entries are:
Posted by Arun Gupta in web2.0 | Comments[0]
|
|
|
|