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 deployment platform for all your Rails applications. And you can even purchase enterprise support as well!
This screencast shows how you can create a simple Rails application using NetBeans IDE, deploy it directly on GlassFish v3 and then debug it.
Typo, Redmine, Substruct, and Mephisto are some of the applications I’ve tried deploying on GlassFish. Have you tried deploying your Rails app on GlassFish ?
File Rails/GlassFish related bugs here using “jruby” sub-component and ask your questions on .
All other GlassFish related screencasts are available here.
Technorati: glassfish v3 netbeans rubyonrails jruby screencast
Related posts:- Screencast #27: Simple Web Application using NetBeans 6.5 IDE and GlassFish v3 Prelude
- Screencast #28: Simple Web Application using Eclipse and GlassFish v3 Prelude
- Substruct on GlassFish v3 – Ruby-on-Rails E-Commerce Application
- Developing GlassFish- and MySQL-Backed Applications with Netbeans and JRuby-on-Rails – Free Webinar on Jan 27
- Debug application code deployed on GlassFish using NetBeans ?
I just finished watching this. Great job on the screencast – thanks for taking the time to do it. I love that NetBeans makes Ruby on Rails a first-class platform in the IDE, and its integration with GlassFish is top-shelf.
I have one question. I noticed that when you started your sample app normally it deployed it at context /GlassFishV3Rocks. When you started it in debug mode, though, it launched it at the root context. Was that expected?
It caught my eye because I’ve not yet been able to make sense of NB’s "Deploy all Rails applications at root context" setting under Tools -> Servers -> GlassFish v3 Prelude -> JRuby tab. When unchecked, NB deploys things at /. When checked, it seems to give them a context matching the application’s name. This seems reversed.
Comment by Bill Kocik — November 7, 2008 @ 6:48 am
NetBeans 6.5 enables Rails debugging by running a small Grizzly + Rails stack. This small stack is managed similar to the way WEBrick and Mongrel are managed, so deployments are at context root and the HTTP port is dynamically selected.
Due to technical limitations (which are being resolved for the next version of NetBeans), it was not possible to enable debugging of Rails apps against the "full server". Thus the experience is slightly different because the runtime scenario actually is slight different.
I can’t explain your observation of a reversal of the "Deploy at /" setting. You’re correct that what you describe happening is the opposite of what should happen. You can check how an application is actually deployed by looking in domain.xml (in domains/[domain folder]/config/domain.xml) near the top. Or you can go the services tab in NetBeans, browse the deployed applications and select "Open in Browser" to access one of them and see what URL is used. That will indicate how the application is actually deployed, which should match whatever you read out of domain.xml. If "Deploy at /" is checked, then no context should be used. You may need to "Run" the application after making changing the properties setting, to ensure it takes effect. If this last thing seems counterintuitive, please file an RFE against serverplugins/glassfish_v3. I think there are some things I can do about that.
Comment by Peter Williams — November 7, 2008 @ 1:46 pm
I just downloaded NB 6.5 IDE RC2 — Ruby Pack and when I make a new Rails app using jruby 1.1.4 the only server listed is Webrick …?
Comment by Stephen Bannasch — November 7, 2008 @ 2:10 pm
Ahh … I had to use the NB menu option: Tools/Servers and add the GF server that was in the NB app bundle (this is MacOS X).
I’m subscribed to the GF-dev list — is there a better list for discussion of ruby web applications and GF?
Last question for now.
I have an app environment that combines Tomcat running a Java web start server, and two Rails apps.
Can I use NB and GF to deploy and debug all three apps?
Comment by Stephen Bannasch — November 7, 2008 @ 2:33 pm
Rails debugging is supported only on GlassFish v3. I suspect you are deploying your Rails app on Tomcat as WAR files. You can deploy them natively (no packaging or Servlet container) on GlassFish v3 Prelude. And then you should be able to debug them easily
As mentioned in the blog, please direct your questions to .
Comment by Arun Gupta — November 7, 2008 @ 2:45 pm
FYI: all these tests are in JRuby
I claimed the previous message had the last question — I guess that wasn’t true.
I copied a dir with a current Rails app and opened it in NB. This somewhat confusing error appeared in a dialog titled "Error":
Rake tasks fetching failed with (working directory: /Users/stephen/dev/rails/sds_auth_nb
hmm …?
There is no obvious console output that describes in more detail what NB was doing to generate this message.
I noticed that creating and running a simple test app in NB and GF the test app specified the mysql adapter in config/database.yml
When I normally run rails apps that access mysql in jruby I use the ar jdb gem/driver and spec my adapter as:
jdbcmysql
Actually the line really looks like this so I can easily switch back and forth between jruby and cruby:
adapter: <% if RUBY_PLATFORM =~ /java/ %>jdbcmysql<% else %>mysql<% end %>
I also use this in environment.rb:
if RUBY_PLATFORM =~ /java/
require ‘rubygems’
RAILS_CONNECTION_ADAPTERS = %w(jdbc)
end
Comment by Stephen Bannasch — November 7, 2008 @ 2:48 pm
Starting NB_GF on my existing imported Rails app displays this in the GF console:
Unrecognized VM option ‘+UnlockDia’
Could not create the Java virtual machine.
The Server Startup progress bar shows activity but the server never starts.
Comment by Stephen Bannasch — November 7, 2008 @ 2:52 pm
Stephen, can you run the IDE with -J-Dglassfish.level=FINE and send the server JVM start command that will be written to the netbeans log file to ? We can resume the discussion there.
is the right alias for asking all your Rails/NetBeans related questions.
Comment by Arun Gupta — November 7, 2008 @ 5:16 pm
Hi Peter -
I’m definitely seeing some strangeness with contexts and routing when loading a Rails app into GF v3 from NB 6.5. But rather than pollute Arun’s blog with my issues, I’ve posted them to the mailing list.
Thanks again to both of you.
Comment by Bill Kocik — November 8, 2008 @ 8:30 am
Hi Stephen,
Regarding the error you saw, please see
http://wiki.netbeans.org/FaqRubyRakeFetchingFailed for more info on that. Basically the IDE tried to fetch the descriptions for the Rake tasks in the project using ‘rake -D’ and it failed.
Erno
Comment by Erno Mononen — November 10, 2008 @ 2:19 am
[Trackback] 1400 registrations, 112 sessions, free pizza, a barbecue on Saturday night, raffles and lot more – that is Silicon Valley Code Camp. Jitu, Jiandong, Jacob, and I presented on GlassFish at Silicon Valley Code Camp over the weekend. The…
Comment by Arun Gupta's Blog — November 11, 2008 @ 4:32 am
Hi I follow your work from NetBeans nbweekly and love it.
Is simple to follow and great to know.
Thank you for yours post….
Comment by jose antonio ramos — November 11, 2008 @ 6:22 am
[Trackback] GlassFish Gem 0.9.0 was recently released. It can run any Rack-compatible framework such as Rails and Merb. Support for another Rack-based framework Sinatra will be released in the near future. The gem is even extensible and allows to plug any of…
Comment by Arun Gupta's Blog — November 14, 2008 @ 9:36 am
[Trackback] Presented on GlassFish at Java MUG last week. The event is hosted at Sun’s North Dallas Office. It was impressive to know that local Sun team is hosting 4 User Groups (MySQL, Solaris, and OpenSolaris other than the JUG)…
Comment by Arun Gupta's Blog — November 17, 2008 @ 5:53 am
Hi Arun,
thanks for the nicely done, concise screencast.
Debugging RoR in NB6.5 isn’t working for me, probably because I got the concept wrong? I am on Mac OSX Leopard, using a MacPorts installation of Ruby / RubyGems.
When I start the NB 6.5 debugger in my RoR project (choosing server side ruby debugging), Firefox will launch with the start page of my RoR project on localhost:3000 (Mongrel). Now, when I navigate to the controller I set my breakpoint in, the breakpoint in the IDE doesn’t get hit.
In the NB sessions window, I can see the session being started at localhost:53353. The status is always "starting". Entering the address localhost:53353 in the browser does nothing, the request stalls.
Hence my question: Is it possible debugging my RoR application on Mongrel? If so, how do I set the debugger to work together with it?
Comment by Benny — December 17, 2008 @ 4:08 am
Benny, I posted your question to . Please follow up at:
http://ruby.netbeans.org/servlets/BrowseList?listName=users&by=date&from=2008-12-01&to=2008-12-31&first=1&count=110
Comment by Arun Gupta — December 17, 2008 @ 10:37 pm
4544
Comment by Anonymous — December 19, 2008 @ 10:28 am
How to Configure a MySql database to be able to connect Netbeans6.5.?
I’ve tried using mysql Server 6 many times, but it fails.
Please, let me know how to fix that problem.
Thank you
Comment by D Stephen — December 26, 2008 @ 11:05 am
This is now answered at:
http://blogs.sun.com/arungupta/entry/totd_60_configure_mysql_6
Comment by Arun Gupta — January 6, 2009 @ 5:51 am
[Trackback] This Tip Of The Day answers the following comment on my blog: How to Configure a MySql database to be able to connect Netbeans6.5.? I’ve tried using mysql Server 6 many times, but it fails.Please, let me know how…
Comment by Arun Gupta's Blog — January 7, 2009 @ 9:16 am
[Trackback] Here is a blog entry that was sitting in my Drafts folder for a long time (just because I didn’t realize . Anyway, it shows how to install Open Solaris 2008/11 on Virtual Box. The original install was done using…
Comment by Arun Gupta's Blog — January 13, 2009 @ 10:56 am
[Trackback] The Sun Tech Days Singapore started earlier this morning – over 1100 developers, an outstanding audience!!! The kick off had a good local flare when the Gods of Longevity, Fortune, and Prosperity (Fu Lu Shou) showed up to start the…
Comment by Arun Gupta's Blog — January 20, 2009 @ 12:29 am
[Trackback] Supper Happy Dev House is "a premier monthly hackathon event that combines serious and not-so-serious productivity with a fun and exciting party atmosphere." The 30th monthly event was hosted at Sun Microsystem’s Executive Briefing Center (aka EBC) in…
Comment by Arun Gupta's Blog — February 3, 2009 @ 5:39 am
[Trackback] Supper Happy Dev House is "a premier monthly hackathon event that combines serious and not-so-serious productivity with a fun and exciting party atmosphere." The 30th monthly event was hosted at Sun Microsystem’s Executive Briefing Center (aka EBC) in…
Comment by Arun Gupta's Blog — February 3, 2009 @ 10:31 am
thank u.Thanks for information
Comment by sinema izle — March 13, 2009 @ 1:39 pm
good
Comment by justin tv — March 24, 2009 @ 12:06 pm
thank you
Comment by Sexy Female Celebs Wallpapers — March 24, 2009 @ 12:10 pm
I’ve tried using mysql Server 6 many times, but it fails.
Please, let me know how to fix that problem.
Thank you
Comment by cilt bakımı — March 24, 2009 @ 12:11 pm
cilt, what error are you getting ? What platform ?
Comment by Arun Gupta — March 24, 2009 @ 1:47 pm
[Trackback] This is a follow up post from David’s keynote. Attended Women in Rails panel discussion. The panel, Sarah Mei, Lori Olson, and Desi McAdam (from L to R), had a very interesting discussion around the genuine problems and possible solutions…
Comment by Arun Gupta's Blog — May 6, 2009 @ 5:39 am
Great Job!
But what about rapid development ?
It seems to me that in this was is not possible create class or modify code on the fly. isn’t it ?
Comment by Ra — June 16, 2009 @ 1:31 am
[Trackback] I presented on "Creating powerful web applications using GlassFish, MySQL and NetBeans/Eclipse" as the first talk of FISL 10 yesterday. The room was only partial full being the first talk of FISL but got packed towards the middle so…
Comment by Arun Gupta's Blog — June 24, 2009 @ 8:56 pm
[Trackback] I presented on "Creating powerful web applications using GlassFish, MySQL and NetBeans/Eclipse" as the first talk of FISL 10 yesterday. The room was only partial full being the first talk of FISL but got packed towards the middle so…
Comment by Arun Gupta's Blog — June 24, 2009 @ 9:00 pm
This is my first post on blogs.sun.com. I hope to use this space do discuss current topics in the areas on web application security and data privacy.
http://www.watchrolexshop.com
http://www.gamegoldme.com
http://www.cheap-lotrogold.com
http://www.globalsale.me/Aion-gold-083.aspx
http://www.cheap-gamegold.org
http://www.gamegoldvip.org
Comment by aion gold — June 24, 2009 @ 11:10 pm
http://www.globalsneaker.com
Comment by nike hign tops — July 7, 2009 @ 6:31 pm
we engaged in discount jewelry, cheap jewelry, handmade jewelry, discount fashion jewelry, china jewelry, wholesale discount jewelry, discount china jewelry, discount handmade jewelry, handcrafted jewelry, discount costume jewelry, discount pearl jewelry, discount gemstone jewelry, discount turquoise jewelry, discount coral jewelry, discount shell jewelry, discount crystal jewelry, discount jewellery, cheap jewellery, handmade jewellery, discount fashion jewellery, wholesale jewelry,china jewellery and so on.
Comment by discount jewelry — July 8, 2009 @ 12:21 am
wholesale replica handbags
Comment by sare — August 1, 2009 @ 2:44 am
A father of five children came home with a toy,summoned his children and asked which one of them should be given the present,"Who is the most obedient,never talks back to Mother and does everything he or she is told?" he inquired. There was silence,and then a chorus of voices:"You play with it, Daddy!"
Comment by cheap gucci shoes — August 12, 2009 @ 8:53 pm
China Costume Jewelry—Wholesale Costume Jewelry, costume jewelry Costume Jewelry Wholesalers,rhinestone costume jewelry,cheap costume jewelry, costume jewelry supplies Vintage Costume Jewelry,gold costume jewelry, designer costume jewelry,discount costume jewelry, Gold Costume Jewelry,bridal costume jewelry, costume jewelry wholesalers, costume jewelry rings
Comment by sterling silver jewelry — August 20, 2009 @ 11:31 pm
<H1><strong><a title="ثيمات" href="http://vb.5b5b.com/f113/">ثيمات</a></strong></H1>
<H1><strong><a title="نغمات" href="http://vb.5b5b.com/f18/">نغمات</a></strong></H1>
<H1><strong><a title="رسائل" href="http://vb.5b5b.com/f192/">رسائل</a></strong></H1>
<H1><strong><a title="جوال" href="http://vb.5b5b.com/">جوال</a></strong></H1>
<H1><strong><a title="برامج" href="http://vb.5b5b.com/f12/">برامج</a></strong></H1>
<H1><strong><a title="صور" href="http://www.arab-photos.net/">صور</a></strong></H1>
<H1><strong><a title="كورة" href="http://vb.5b5b.com/f43/">كورة</a></strong></H1>
<H1><strong><a title="افلام" href="http://www.arab-movies.net">افلام</a></strong></H1>
<H1><strong><a title="العاب" href="http://www.arab-games.com/">العاب</a></strong></H1>
<H1><strong><a title="مقاطع بلوتوث" href="http://vb.5b5b.com/f17/">مقاطع بلوتوث</a></strong></H1>
<H1><strong><a title="شات" href="http://chat.sh8d.com/">شات</a></strong></H1>
<H1><strong><a title="دردشة" href="http://www.sh8d.com/">دردشة</a></strong></H1>
<H1><strong><a title="منتدى شهد" href="http://vb.sh8d.com/">منتدى شهد</a></strong></H1>
<H1><strong><a title="شهد" href="http://www.sh8d.com/">شهد</a></strong></H1>
<H1><strong><a title="منتديات شهد" href="http://vb.sh8d.com/">منتديات شهد</a></strong></H1>
<H1><strong><a title="ترجمة" href="http://www.trgmh.com/">ترجمة</a></strong></H1>
<H1><strong><a title="نيونار" href="http://www.newn2r.com/">نيونار</a></strong></H1>
<H1><strong><a title="شات" href="http://www.3atboha.com/">شات</a></strong></H1>
<H1><strong><a title="دردشة كتابية" href="http://www.re44re.com/">دردشة كتابية</a></strong></H1>
<H1><strong><a title="منتدى" href="http://vb.sh8d.com/">منتدى</a></strong></H1>
<H1><strong><a title="منتديات" href="http://vb.galiti.com/">منتديات</a></strong></H1>
<H1><strong><a title="منتدى" href="http://forum.6hk.com/">منتدى</a></strong></H1>
<H1><strong><a title="منتدى بنات" href="http://vb.bnatdll3.com/">منتدى بنات</a></strong></H1>
<H1><strong><a title="دردشة كتابية" href="http://www.sh8d.com/">دردشة كتابية</a></strong></H1>
<H1><strong><a title="شات شهد" href="http://www.sh8d.com/">شات شهد</a></strong></H1>
<H1><strong><a title="دردشة شهد" href="http://www.sh8d.com/">دردشة شهد</a></strong></H1>
<H1><strong><a title="دردشة ضحك" href="http://www.6hk.com/">دردشة ضحك</a></strong></H1>
<H1><strong><a title="شات سكر" href="http://www.skkkr.com/">شات سكر</a></strong></H1>
Comment by omar7 — September 5, 2009 @ 8:33 am
[url=http://vb.5b5b.com/f18/bنغمات/b/url
[url=http://vb.5b5b.com/bجوال/b/url
[url=http://www.arab-photos.net/bصور/b/url
[url=http://www.arab-movies.netbافلام/b/url
[url=http://vb.5b5b.com/f43/bكورة/b/url
[url=http://www.newn2r.com/bنيونار/b/url
[url=http://vb.sh8d.com/bمنتدى/b/url
[url=http://www.3atboha.com/bشات/b/url
[url=http://www.skkkr.com/b شات سكر[/b][/url]
Comment by omar7 — September 5, 2009 @ 8:34 am
<A href="http://www.china-costume-jewelry.com">Costume Jewelry </A>
<A href="http://www.china-costume-jewelry.com">wholesale Costume Jewelry </A>
<A href="http://www.chinafashionjewelrywholesale.com">china fashion jewelry wholesale</A>
<A href="http://www.925-silver-wholesale.com">925 silver jewelry wholesale</A>
<A href="http://www.chinafashionjewelrywholesale.com">cheaper fashion jewelry</A>
<A href="http://www.chinafashionjewelrywholesale.com">korea jewelry</A>
<A href="http://www.925-silver-wholesale.com">sterling silver jewelry</A>
<A href="http://www.chinacheaperwholesalejewelry.com">cheaper wholesale Jewelry </A>
Comment by costume jewelry — September 10, 2009 @ 9:20 pm
The tragedy of life is not so much what men suffer, but what they miss.
Comment by ugg slipper — September 15, 2009 @ 8:47 pm
we supply <A href="http://www.china-jewelry-supplier.com">jewelry rings</A>\
<A href="http://www.china-jewelry-supplier.com">jewelry necklace</A>\
<A href="http://www.china-jewelry-supplier.com">earring jewelry</A>\
<A href="http://www.china-jewelry-supplier.com">amber jewelry</A>\
<A href="http://www.china-jewelry-supplier.com">pearl jewelry</A>\
<A href="http://www.china-jewelry-supplier.com">crystal jewelry</A>\on our site china-jewelry-supplier.com welcome
and we wholesale <A href="http://www.silver-jewelry-wholesaler.com">925 silvery</A>|
<A href="http://www.silver-jewelry-wholesaler.com">sterling silver</A>|
<A href="http://www.silver-jewelry-wholesaler.com">silver crystal</A>| at silver-jewelry-wholesaler.com
another we have <A href="http://www.jewellerywholesales.com">jewellery wholesale</A>|
<A href="http://www.jewellerywholesales.com">fashion jewellery</A>|
<A href="http://www.jewellerywholesales.com">silver jewellery</A>| at jewellerywholesales.com
<A href="http://www.sterling-silver-925.com">sterling silver 925</A>|
<A href="http://www.sterling-silver-925.com">silver 925</A>|
Comment by staje — September 19, 2009 @ 12:55 am
supply all kinds fashion jewelry,cheap wholesale jewelry
Comment by jewelry wholesale — November 3, 2009 @ 6:09 am
Hey Arun,
Very concise and easy to follow screencast on how to get up and running on ROR with Netbeans. The best one I have watched. 5*. Thank you.
Comment by Joey the Fish. — February 13, 2010 @ 3:54 am
Thanks Joey!
Comment by Arun Gupta — February 15, 2010 @ 4:38 pm
Have you tried deploying your Rails app on GlassFish
Comment by discount jerseys — June 2, 2010 @ 7:15 pm