I had a lot of trouble with some rubygem warnings after upgrading to Ruby 1.9.1 and Rails 3.0 on Mac OS x Snow Leopard. They always occurred when I started the server within the project with the command

At first, when running on bundler 0.9.3, I had two types of errors. The first NoMethodError populated the terminal with hundreds lines of code, like …

The bundler-team around Carlhuda fixed that issue within bundler 0.9.4. So that problem will not occur any more.
The other problem was quite persistent. When starting the server via

or doing a test via

within the rails-3-project resulted in a bunch of warnings:

Jeremy Kemper from the Rails core team pointed out that this is not a Rails problem, but a RubyGems issue. Ruby 1.9 ships with an outdated RubyGems … like 1.9.1p378 ships with RubyGems 1.3.1. I did update RubyGems to Version 1.3.5 by

but this resulted in some duplicated rubygem files, which cause the error.

So how can the problem be solved? Deleting and reinstalling Ruby 1.9.1 does not have any effect … but the solution is quite simple:

If you already installed Ruby 1.9.1 and Rails 3.0 beta:

1. Be sure that you do NOT install RubyGems 1.3.5 separately after the installation of Ruby 1.9.1 – this would result in a double installation. So have that in mind when following the excellent instructions to installing Ruby, RubyGems, and Rails on Snow Leopard of Dan Benjamin.

2. If you already installed Ruby 1.9.1, updated to RubyGems 1.3.5 and bundler 0.9.4 and also installed Rails 3.0, the only thing you have to do is:

That’s it. No errors any more!

If you did not install Ruby 1.9.1 and Rails 3.0 yet …

1. You may start with Dan Benjamin’s recipe and modify it so you download, make and install the ruby-1.9.1-p378.tar.gz but NOT the rubygems-1.3.5.tgz.

2. Then update RubyGems with the command

3. Ensure that the rake and the sqlite3-ruby gems are installed, too.

4. Now install the needed gems and rails –pre as described in the Rails 3.0 beta release notes

5. After the successful installation of Rails 3.0 beta, you now have to do the vitally important step:

6. Finally check, if any gem needs an update before diving into Rails 3.0 by

Hope this helps … and saves some time. Thx Andy for the hint ;-)

The registration for the – again – biggest Ruby-on-Rails conference in the US is now open: RailsConf 2009. O’Reilly organizes the conference again. but this time it’s not Portland but Las Vegas where the rails community meets again. Las Vegas is not only the US center of gambling and entertainment – it’s also one of the much sought-after conference locations ;-)
If you register before March 16th 11:59pm you’ll get an early-bird bonus and save 200 USD.
All rails-pros who want to share their knowledge and give a presentation at the conference, the Call for Participation deadline is extended to February 17th 2009. So you have to be fast!
The conference will be at the Las Vegas Hilton from May 4th to 7th 2009.

Viva Las Vegas!

Sources: rubyonrails.com, RailsConf.com

Zend Framework reached Version 1.5 since the last article about Zend or Rails. Ruby on Rails also did a big step towards version 2 – 2.0.2, too be precise ;-)
So, who is my personal winner in this race? Which framework suits best for fast and innovative web application development?
To say things first: My personal favorite is Ruby-on-Rails!

But the burning questions is: Why!

  1. Ruby instead of PHP: At first it sounds rather loose to cold-shoulder the sweat and tears of learning PHP – and dig deeply into a quite young and a pure object oriented language. But everybody I talked to in the last months who came from Java or PHP just told me the same story: It’s no big deal to learn Ruby – and the benefits are overwhelming. Ruby enables you to write elegant, readable and easy to maintain code.
  2. Vision-Driven-Community: No matter where you get in contact with the Rails community – at a developers conference or in a mailing-list: The basic mood and vision of the community is friendly, catching, international and productive. It’s all about creating something new, something better and more elegant with the power of the community … take a look at the RailsConf 2007 keynote of David Heinemeier Hansson in Portland.
  3. Scalability: By now, there are several examples of high scaling web applications with rails. The only con of Rails applications compared to Zend framework apps is the need of a little bit more hardware. But the pros are worth it: faster development and easier maintenance. Twitter, Qype and Xing show it. Especially, the Twitter developers love to twitter about scalability, like Britt Selvitelle auf der RailsConf Europe 2007 in Berlin.
  4. REST: Version 2.0 is a big step towards the principle of Representational state transfer. Now REST is deeply implemented into the Ruby on Rails framework. This makes it easy to create consistent interfaces to other systems. REST was nearly buried in oblivion but it’s a sophisticated and strong feature based on the http protocol. Find out more by the free PDF-book of b-simple focusing on RESTful-Rails.
  5. Database-Migrations: Rails offers a powerful script based tool to create and redo database structures called migrations. For projects following the principles of “pragmatic programming” this is a perfect tool to create and improve the whole database schema and fill tables with data. Zend want to have a feature like that, too. There is a proposal for that feature – but nobody knows when this will be implemented and how it will function.
  6. Test-Driven-Development: Rails still is one of the leaders in TDD by it’s built in creation of test infrastruktur for automated unit- tests, functional tests and integration tests. Zend Framework tries to catch up with its ZFTestManager – but a conclusive integration into the framework is still missing.
  7. MultiView: Within Rails, content can be presented in different ways according to the type of request. You easily can create different views to show the data as a CSV file, an RSS feed, a classical HTML page or as a special iPhone page. SlashDotDash shows, how easy it is to create a special iPhone optimized user interface for a rails app.

But there are some specific projects, which are not well suited for Rails Mehr …