First Steps with Ruby

I am a Java guy. I have nearly 10 years experience with Java. I have build high scale able Web Apps with Java, Spring, Struts, JSF, Hibernate, JDBC, Ant, Maven2, JUnit and some other crazy Frameworks.

Now I want to try out something new. I am playing around with Ruby, Rails, Gem, Rake and all the other Ruby Tools. My First impression. To install the newest version of Ruby and Rails on a Mac, it is a pain in the ass!

Ruby 1.8.2 is already pre installed on Mac OS X Snow Leopard. With MacPorts you can install pretty easy the version 1.9.1.

sudo port install ruby19

A more detailed tutorial you can find here: Tutorial

Over rubygems I fetched the newest version of the Rails Framework, 3.0.4. Then I try to use it, I get this Message:

Rails 3 doesn't officially support Ruby 1.9.1 since recent stable
 releases have segfaulted the test suite. Please upgrade to Ruby 1.9.2.

 You're running
 ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10]

All right! No Problem. I am a big boy. I can install the newest version 1.9.2 from the source code. Just download the sourcecode for Ruby 1.9.2 and compile & build it from the source:

./configure
make
make test
make install

The command “ruby –version” now shows me:

ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.6.0]

All right. Looks good. Trying again to use rails. “rails –version”. Still get the same Message:

Rails 3 doesn't officially support Ruby 1.9.1 since recent stable
 releases have segfaulted the test suite. Please upgrade to Ruby 1.9.2.

 You're running
 ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10]

Hm. I am pretty sure I have version 1.9.2 on my Mac! How to tell Rails to use the newest version?

Any Ideas ???

One thought on “First Steps with Ruby

  1. OK. I fixed the problem.

    The problem was that my MacPorts needed an update. After

    sudo port selfupdate

    I could fetch the newest version of Ruby 1.9.2 over MacPorts. Then I reinstalled again gem and rails and it worked fine for me.

    MacPorts are pretty cool!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s