![]() |
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. |
I found out about this application from Sang “Passion” Shin’s Lab 5543 (part of FREE 20-week course on Ruby-on-Rails started on Jul 15, 2008). But instead of using standard WEBrick/Mongrel deployment, I describe the steps to deploy this application using GlassFish v3 that supports native deployment of Rails applications.
- Typo can be installed as Gem or from Sources. Installing as gem gives the following error:
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.outThis is discussed here. In the meanwhile, download and unzip Typo 5.1.2 as:
~/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 - Create the database:
~/samples/jruby >sudo mysqladmin create typo_dev Typo 5.1.x works with Rails 2.0.x only and so migrate as shown below:
~/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) ================================= - Download GlassFish (nightly, promoted or build-your-own) and install by unzipping. I tried the nightly of 8/24 as:
~/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 - Start GlassFish as:
~/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 platformWelcome 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 - And deploy Typo as:
~/samples/jruby >~/tools/glassfish/v3/8-24/glassfish/bin/asadmin deploy typo-5.1.2 Command deploy executed successfully.
Typo 5.2 (scheduled in 3 days) will work with Rails 2.1.
The application is available at “http://localhost:8080/typo-5.1.2″ and some of the screenshots follow:







Also check out Redmine, Substruct and Mephisto on GlassFish v3. There are some performance issues when running Typo on GlassFish and this is tracked at Issue #5662.
If your Rails application does not work on the gem, file bugs here with “jruby” as “subcomponent” (default version is “v3″).
Technorati: rubyonrails glassfish v3 jruby ruby typo blogging
Related posts:- TOTD #104: Popular Ruby-on-Rails applications on GlassFish v3 – Redmine, Typo, Substruct
- “Rails powered by GlassFish & jMaki” @ South Bay Ruby Meetup – Jan 29, 7pm
- Redmine on GlassFish – Ruby-on-Rails Project Management Application
- Getting Started with Ruby-on-Rails, GlassFish and NetBeans
- Track your running miles using JRuby, Ruby-on-Rails, GlassFish, NetBeans, MySQL, and YUI Charts

thank you
Comment by piercing — August 28, 2008 @ 1:43 pm
Hey thanks for the post! In your opinion is Glassfish v3 prelude good app server for Jruby on Rails applications or is it better to stick with v2u2? Is v3 prelude also ready for enterprise deployment for Jruby on Rails?
Comment by Nabeel Zafar — November 5, 2008 @ 4:59 pm
Nabeel,
Great timing for your comment!
GlassFish v3 Prelude is released this morning and can be used for deploying all your JRuby-on-Rails applications, natively without any packaging. It is certainly ready for enterprise deployment and you can even buy production support for all your apps. Read more details at:
http://blogs.sun.com/arungupta/entry/glassfish_v3_prelude_now_available
Many more blog entries on Rails/GlassFish are available at:
http://blogs.sun.com/arungupta/tags/rubyonrails+glassfish
Comment by Arun Gupta — November 6, 2008 @ 6:48 am
[Trackback] GlassFish v3 Prelude is now available. It allows Rails applications to be deployed natively using JRuby and without the need of any WAR packaging or Servlet container. An integrated NetBeans tooling provides a comprehensive development and deploy…
Comment by Arun Gupta's Blog — November 7, 2008 @ 5:52 am
[...] Typo on GlassFish – Typo is the oldest Ruby on Rails blogware. The simplified steps to deploy Typo on GlassFish v3 are given below (also on GlassFish Prelude): [...]
Pingback by Popular Ruby-on-Rails applications on GlassFish v3 – Redmine, Typo, Substruct « Miles to go … — September 17, 2009 @ 11:17 pm
it was kinda weird because i was googling the words “free blogger sites” i was going to set up a lots of blogs for promoting my website but when i clicked one of the results i was redirected here, i read a lot of things about typo and it makes me curious is this typo thing a free blogger platform?
Comment by sutomotive condensers — April 21, 2010 @ 12:25 am
oops wait i forgot to ask a favor, can i hope for the soonest reply.
Comment by automotive condensers — April 21, 2010 @ 12:31 am
i.m enrolling for a programming lesson this enrollment but im afraid that knowledge in vb and c++ isnt enough for a good start.
Comment by lee hee hyo — April 21, 2010 @ 12:34 am