# Ruby/rails on Mac OSX not working

**URL:** <https://www.ruby-forum.com/t/ruby-rails-on-mac-osx-not-working/58636>\
**Category:** Rails\
**Created:** [April 24, 2006, 10:50am UTC](https://www.ruby-forum.com/t/ruby-rails-on-mac-osx-not-working/58636 "2006-04-24T10:50:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregnewman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a9a28c/32.png) [@gregnewman](https://www.ruby-forum.com/u/gregnewman)\
**Post date:** [April 24, 2006, 10:50am UTC](https://www.ruby-forum.com/t/ruby-rails-on-mac-osx-not-working/58636/1 "2006-04-24T10:50:14Z")

</div>

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:in`require’  
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.

---

<div class="post-metadata">

**Author:** ![gregnewman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a9a28c/32.png) [@gregnewman](https://www.ruby-forum.com/u/gregnewman)\
**Post date:** [April 24, 2006, 10:57am UTC](https://www.ruby-forum.com/t/ruby-rails-on-mac-osx-not-working/58636/2 "2006-04-24T10:57:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gregnewman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a9a28c/32.png) [@gregnewman](https://www.ruby-forum.com/u/gregnewman)\
**Post date:** [April 24, 2006, 11:05am UTC](https://www.ruby-forum.com/t/ruby-rails-on-mac-osx-not-working/58636/3 "2006-04-24T11:05:00Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![gregnewman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a9a28c/32.png) [@gregnewman](https://www.ruby-forum.com/u/gregnewman)\
**Post date:** [April 24, 2006, 11:22am UTC](https://www.ruby-forum.com/t/ruby-rails-on-mac-osx-not-working/58636/4 "2006-04-24T11:22:21Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![gregnewman](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/a9a28c/32.png) [@gregnewman](https://www.ruby-forum.com/u/gregnewman)\
**Post date:** [April 24, 2006, 11:28am UTC](https://www.ruby-forum.com/t/ruby-rails-on-mac-osx-not-working/58636/5 "2006-04-24T11:28:18Z")

</div>

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!
