RVM (Ruby Version Manager) – broken !?

Yesteday I installeld RVM on my Mac. RVM is a version Manager for Ruby. I wanted install ruby 1.9.2 with rvm.

rvm install 1.9.2

After a while I got this Message:

/Users/robert/.rvm/scripts/manage: line 135: syntax error in conditional expression: unexpected token `;'
/Users/robert/.rvm/scripts/manage: line 135: syntax error near `;'
/Users/robert/.rvm/scripts/manage: line 135: `      if [[ -d "$directory" && "$directory" != '/']] ;  then'

Thanks! Installing Ruby via MacPorts was more successful.

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 ???

Archetype: SpringMVC + Spring 3.0.5.RELEASE + JPA 1.0

This maven2 archetype contains a little sample application with the Spring 3.0.5 Framework, Spring Mvc and JPA 1.0. It is deployed on the PLOIN Repository-Server on

http://www.ploin-m2.de/nexus/content/groups/public/

you can create a project from the archetype with the following command:

mvn archetype:generate -DarchetypeGroupId=org.ploin.archetype -DarchetypeArtifactId=tempSpringMvcJpa -DarchetypeVersion=1.1 -DarchetypeRepository=http://www.ploin-m2.de/nexus/content/groups/public/ -DgroupId=org.ploin -DartifactId=demoSpringMvcJpa

This archetype shows how the REST is working in Spring 3 and how you can use it together with JPA 1.0.