Ruby/rails on Mac OSX not working

I have been using Locomotive for rails development and recently decided
to fix up the ruby/rails install that is on my mac.

As we all know, Ruby 1.8.2 came on the mac and has problems, so I
followed the instructions at Hivelogic for installing the latest
versions of Ruby, Rails, Lighttpd and so forth.

I have this set in my path within bash_login: export
PATH="/usr/local/bin:/usr/local/sbin:$PATH"

After going throught the installation, I can’t get ruby to work. I can
however check the version with ruby -v which returns 1.8.2 still.
Ocassionally, firing up the terminal and repeating the version gives me
1.8.4, but it’s never consistent.

When I cd into a project that I’ve created with Locomotive and try to
start the server (ruby script/server) it get the following:

./script/…/config/boot.rb:15:in require': No such file to load -- rubygems (LoadError) from ./script/../config/boot.rb:15 from script/server:2:inrequire’
from script/server:2

If i use “/usr/local/bin/ruby script/server” it fires up webrick using
ruby 1.8.4
I must say though THIS IS NEVER CONSISTENET. Sometimes it fails.

My question is, why is it so inconsistent? I’m a mac convert from
windows, so maybe there is something I’m missing with the paths. Any
help would be greatly appreciated.

On 24 Apr 2006, at 10:50, Greg N. wrote:

./script/…/config/boot.rb:15:in `require’: No such file to load –
windows, so maybe there is something I’m missing with the paths. Any
help would be greatly appreciated.

Open de Terminal and type:

sudo pico .bash_login

If the file is empty, you’re having the same problem I had. Using
“mate”, the bash login wasn’t saved for some reason. If this is the
case, just type in the PATHs again using pico and save it.

Another reason could be that you have a .bash_profile already, and it
takes precedence over .bash_login.

Best regards

Peter De Berdt

Peter De Berdt wrote:

On 24 Apr 2006, at 10:50, Greg N. wrote:

./script/…/config/boot.rb:15:in `require’: No such file to load –
windows, so maybe there is something I’m missing with the paths. Any
help would be greatly appreciated.

Open de Terminal and type:

sudo pico .bash_login

If the file is empty, you’re having the same problem I had. Using
“mate”, the bash login wasn’t saved for some reason. If this is the
case, just type in the PATHs again using pico and save it.

Another reason could be that you have a .bash_profile already, and it
takes precedence over .bash_login.

Best regards

Peter De Berdt

The bash_login file is saving properly. I do however have a
bash_profile and I also have a .cshrc file. Should I delete the
bash_profile? What about the cshrc file?

The bash_login file is saving properly. I do however have a
bash_profile and I also have a .cshrc file. Should I delete the
bash_profile? What about the cshrc file?

Concerning the cshrc file, I think it only matters if you’re using
the C-Shell and not bash. Bash is the default shell in OS X > 10.2.

You could just add the PATHs to the .bash_profile or if
the .bash_profile file is empty, you can just delete it.

Best regards

Peter De Berdt

Peter De Berdt wrote:

The bash_login file is saving properly. I do however have a
bash_profile and I also have a .cshrc file. Should I delete the
bash_profile? What about the cshrc file?

Concerning the cshrc file, I think it only matters if you’re using
the C-Shell and not bash. Bash is the default shell in OS X > 10.2.

You could just add the PATHs to the .bash_profile or if
the .bash_profile file is empty, you can just delete it.

Best regards

Peter De Berdt

This is what I had in my bash_profile:
export PATH=/usr/local/mysql/bin:$PATH
export PATH="/usr/local/bin/ruby:$PATH"

I changed it to:
export PATH=/usr/local/mysql/bin:$PATH
export PATH="/usr/local/bin:$PATH"

Now it’s working great. Thanks for your help Peter!