views:

288

answers:

1

Hi! I just tried to play with Ruby on Rails on Snow Leopard. I was following this tutorial: http://developer.apple.com/tools/rubyonrails.html Whatever I try to do with rails I end up with:

MacBook-Pro-lm:~ lukasz$ rails blog
    **undefined method `camelize' for "app":String**

    MacBook-Pro-lm:~ lukasz$ rails --help
    **undefined method `camelize' for "app":String**

Really basic things... however - verbosing rails works:

MacBook-Pro-lm:bin lukasz$ rails -v
Rails 2.3.5

MacBook-Pro-lm:~ lukasz$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin10]

MacBook-Pro-lm:bin lukasz$ gem -v
1.3.7

So it seems I have installed and upgarded ruby (using macports), rubygems and rails successfully (according to terminal). There are also few other packages installed to support we development like passenger and mysql5, etc...

I can find ruby installed in the /opt/local/bin directory. My environment PATH variable is:

PATH=/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

The is something fishy going on. It must be some stupid basic problem. Google says that there could be a problem with ruby-iconv library but I can not find/install this package using port or gem commands.

Plese help.... what am I missing here?

+1  A: 

You might want to try to check where the gem was installed:

gem list -d rails

Compare the gem installation directory with other gems that rails needs. It seems to me that it is a ruby gems issue. Make sure all the gems was installed with macports version of rubygems. It is not possible to mix and match.

Hopefully it helps.

SamChandra
Hi! I had to uninstall it all Ruby and Rails as I discovered it conflicted with my MAMP PRO installation somehow. My fried said he met the same issue with ruby 1.8.7 version. He defeated it by downgrading to 1.8.6. But I will have to try it another time. I will lat know next time I install Rails.
Lukasz