Category Archives: Ruby/Ruby on Rails

Ruby on Rails and IIS7 Playing Nicely Together

Ruby on Rails has been around for a few years now and has become a hugely popular web development framework, but not on Windows and Internet Information Server (IIS).  Rails has run on Linux and Max OSX almost exclusively, until recently. 

The Ruby on Rails Wiki has a very good article on setting up Ruby on Rails using IIS7.

Enter FastCGI

FastCGI is the key to getting Rails running in IIS.  The FastCGI web site describes FastCGI as:

FastCGI  is a language independent, scalable, open extension to CGI that provides high performance without the limitations of server specific APIs. See the docs for more details.

Dave Scruggs has a nice short tutorial about his experience getting Rails running on Windows Visata SP1 and IIS 7 with FastCGI.  One of the really nice features of Vista SP1 is that it includes FastCGI built-in. 

In the event you are running IIS7 without FastCGI built in, Dave points out a good tutorial from Carlos Caneja called Install FAST CGI on IIS7.

FastCGI is used to serve applications on IIS7 for languages such as:

  • Ruby
  • Python
  • PHP
  • and others….

What about IIS6?

Most of the recent resources on the web I have seen show FastCGI applications running on IIS7, mainly because it is built-into Vista SP1 and that avoids some configuration difficulties but IIS6 does has FastCGI support for it.  I have not personally attempted it but I may in the future.   The IIS.NET site has some information about using FastCGI on IIS6.

It seems the primary support for FastCGI from Microsoft is on IIS7 but not everyone may be at the point where their web servers are running IIS7 just yet. 

Personal Setup

The tutorials given here are very good and work really well with Vista.  I have a VMWare VM setup on my MacBook Pro running Vista SP1, the setup was flawless.  I have an advantage of many years of IIS experience with a couple years of Ruby on Rails experience, which I think does help.

I would like to see some performance numbers of running Rails or any FastCGI hosted application under IIS.  I am not aware of any but would like to hear back from someone putting IIS and FastCGI through it paces.

Technorati Tags: ,,,

First Meeting of the Hartford Ruby Brigade

The inaugural meeting of the Hartford Ruby Brigade is coming March 24, 2008 at the East Hartford Library.

Speaker

Dan Bernier (http://invisibleblocks.wordpress.com/) talking about the Ruby Facets gem.

Raffle

We will be holding a raffle for a book from our generous sponsor Addison-Wesley.  This will be a regular occurrence at our meetings.

Address

East Hartford Library
840 Main St
East Hartford, CT 06108

Date & Time

March 24th 2008
7pm-9pm

Checking out the new Ruby web framework called Waves

waves-logo

I recently had the pleasure to interview Dan Yoder, the creator of a new Ruby web framework called Waves.  Waves is a MVC framework, like that of Ruby on Rails but takes on some very unique ways of doing things and it piqued my interest.   I missed Waves when I wrote about 10 Alternative Ruby Web Frameworks recently and Dan pinged me to let me know about Waves.

Dan has leveraged existing technology were appropriate, such as:

It’s great to see web frameworks being created for Ruby, a perfect example that the success of Rails continues to drive innovation.

You can read my interview with Dan on InfoQ and checkout the Waves feature list on the Waves web site.

 

Technorati Tags: ,,,

Good Merb and DataMapper Tutorial from Atlantic Dominion Solutions

There’s no doubt about it, Ruby on Rails is hot, but not the only game in the Ruby web framework town.  Many Ruby developers are Ruby developers because of Ruby on Rails but these developers are missing out on a web framework just a year old, Merb.

Merb is a web framework created by Ezra Zygmuntowicz, founder of The Engine Yard which provides its own solution to building web applications based on their work with Rails and leveraging some of the downsides to build something better.   Rails uses ActiveRecord to access data but Merb lets the developer choose from others, including DataMapper.  DataMapper is an ORM increasing in popularity due to its simplicity.

I have found a blog over at Atlantic Dominion Solutions that provides some good information on using some of the latest coming from the Ruby world.  One such nugget was an article by Chris Kaukis titled Merborial: Getting Started with Merb and DataMapper.

The article covers:

  • Installing DataMapper
  • Installing Merb
  • Installing DataMapper drivers for Merb
  • Installing Merb Helpers
  • Creating a Merb application
  • Connecting up to DataMapper
  • Database setup and Configuration with Merb
  • Running the Merb application

This is one of those tutorials I had thought to create and blog about but ADS has done this already, so I just wanted to point it out and let you in on a great resource in the ADS blog.

What I learned from Charles Nutter about JRuby

JRubyLogo-140_63pxThe acts_as_conference has passed and was a great time to relax and learn some things related to Ruby.  One of talks I was looking forward to was the talk about JRuby from Charles Nutter.  I was aware of the JRuby project but never really paid close attention to it but with Mr. JRuby himself going to talk about it, I wanted to listen.

JRuby includes features such as:

    • A 1.8.6 compatible Ruby interpreter written in 100% pure Java
    • Most built-in Ruby classes provided
    • Support for interacting with and defining java classes from within ruby
    • Bean Scripting Framework (BSF) support
    • Distributed under a tri-license (CPL/GPL/LGPL)

    When I thought of JRuby I thought of Java and I am not a Java programmer, so JRuby must not be for me.  Charles said he heard this reason many times and he said:

    Not liking JRuby because it is written in Java is like not liking Ruby because it is written in C.

    It may seem obvious, but I never thought of it that way before.

    JRuby Performance Information

    One of the more interesting pieces of information Charles provided was that of the different versions of JRuby and how they related to

    • JRuby 1.0 was 2x slower than Ruby 1.8.6
    • JRuby 1.1 Beta1 2x faster than Ruby 1.8.6
    • JRuby trunk 2-5x faster and often faster than 1.9

    Performance improvements in trunk due to a JIT compiler implementation.  This looks like a huge boost for JRuby and really makes one think about running Ruby in this runtime over native Ruby 1.8.6.

    JRuby Performance Demonstration

    CharlesNutter

    There has been a ton of performance-related bits of information posted on the web lately pertaining to Ruby vs. JRuby vs. other implementations.  These are sometimes hard to get your head around and relate to.  I anticipated Charles would simply gives us some performance numbers from previous tests but he instead run some live tests against different Ruby implementations he had on his laptop.

    Three different types of tests were run, live for us to witness:

    Method Dispatch (10 million invocations)

    • Ruby 1.8.6 ~2.1 secs
    • Ruby 1.9 ~0.95 secs
    • JRuby trunk 1.29 secs for first call and then 0.6 secs (JRuby trunk on Soy Latte)

    Fibonacci

    • Ruby 1.9 0.4 secs
    • Ruby 1.8.6 ~1.54 secs
    • JRuby ~.77 secs first, 0.4 secs subsequently

    Hilbert Matrix of Dimension 2, 4, … 64 times its inverse

    • Ruby 1.9 ~21secs
    • JRuby ~21secs

    These numbers are really encouraging and well beyond what I expected.   This information alone gives good reason for me to look deeper at using JRuby as a Ruby implementation I can use for some Rails applications I have running today. 

    Sun had a good presence at the conference and they seem committed to making Ruby successful on the Java JVM.  They have already converted some of their web sites to run Ruby on Rails on JRuby and they are looking for people to use JRuby and talk about it.  The NetBeans IDE was created by a group at Sun as well.  This is a great IDE for Ruby development and overall project development.

    The talk by Charles really made me more aware of JRuby and convinced me to try it out in conjunction with NetBeans as an IDE on my Windows or Mac machines.

    Technorati Tags: ,

    acts_as_conference is now history

    It’s Saturday night here in Orlando, FL and I just finished listening to Obie Fernandez give the final keynote of a busy two days of talks about Ruby and Ruby on Rails development.

    The conference was very good, it was hard to believe it was the first time the Rails for All folks put in a conference like this one. The event was sold out with about 150 developers from all over the U.S. I think a conference of this size is really nice where you can sit down with speakers, mingle and get to know many of the attendees.

    Meeting New People

    I met a lot of new people from all over the country including some people I only knew from blogs or podcasts.

    Great Speakers

    There were many great speakers at this event, none that I did not enjoy. It was really good to hear the latest about Merb from Ezra Zygmuntowicz, Rubinius from Evan Phoenix and JRuby from Charles Nutter. The presentation from Charles was probably my favorite technical talk. It could be because I learned a lot about JRuby, not knowing too much about it before today. I plan on trying out JRuby along with Netbeans. Sun was a great sponsor as well, having people manning the booth both days.

    I also enjoyed the talk from Charles Brian Quinn about how to approach training people. This was a talk from real experience and makes training more of a possibility for me to offer down the road.

    There was also a great talk on working with teams from Luke Fracl, who I was not familiar with prior to his talk. Luke presents very well and his style gives you confidence he knows his stuff.

    Two of my favorite talks were the two keynotes we had this weekend, the first from Dan Benjamin who talked about building and selling Cork’d. Dan talked about practical views of creating a business, running it, and all around suggestions for running your company. Obie Fernandez was the second keynote speaker, who is one of my favorite authors from his book to his blog. His presentation on practical aspects of being the best developer you can was truly inspiring advice that got me thinking about my own approach to my development work.

    Finally

    Well, it was a great time! I am glad I spent the time to come down to warm Orlando from my home in CT, where it has been snowing for days.

    We had a great party sponsored by Rails Machine at the local ale pub and they gang really had their share of ale. The best part was the conversations we had and the friends made. I look forward to seeing some of these same speakers at RailsConf 2008 in Portland, OR May 29 – June 1, 2008.

    The conference was well organized and I thank all those involved in putting it on.  There was talk about having this event again next year.   I certainly hope so as I plan on attending.

    Technorati Tags:

    Getting ready to head down to Orlando for acts_as_conference

    I am leaving for my flight to Orlando tonight to attend the sold out regional Ruby and Rails conference, acts_as_conferencebadge_med_sponsor

    The conference is the first time it has been put on and hopefully it will carry on in future years.  The lineup of speakers looks great and it should be a good time.  I interviewed the creator of the event, Robert Dempsey, back in the beginning of January to give InfoQ readers a feel for what the conference was about.  I was excited about the content so I figured I would sign up.

    I am anxious for the Charity Session with  Ezra Zygmuntowicz and Evan Phoenix from the Rubinius Project.

    This will be the first conference of the year for me and I will blog a bit from the event.  I am also planning on attending RailsConf 2008 in May.