# Question on gems on Mac OSX

**URL:** <https://www.ruby-forum.com/t/question-on-gems-on-mac-osx/55067>\
**Category:** Rails\
**Created:** [March 16, 2006, 8:04pm UTC](https://www.ruby-forum.com/t/question-on-gems-on-mac-osx/55067 "2006-03-16T20:04:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [March 16, 2006, 8:04pm UTC](https://www.ruby-forum.com/t/question-on-gems-on-mac-osx/55067/1 "2006-03-16T20:04:51Z")

</div>

Hi all,

lately I’ve been working with ROR on a MAC OSX tiger at work, however I  
have one huge problem with seems to be the root of all my problems  
whenever I use terminal or iTerm to start workign with ROR. Every  
single time I open a new terminal window or close one and open a new  
one, I have to reapply my path from .bash\_login for Ruby and MySql, and  
than I have to install the gems for MySql as well as Rails again every  
single time I open or close a Terminal window. Is there anyway to make  
these changes and install stick?

My setup was via this article at

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.

but its very very annoying to have to re-setup these couple of steps  
every single time

again thats

. ~/.bash\_login  
sudo gem install rails --include-dependencies  
sudo gem install mysql – --with-mysql-dir=/usr/local/mysql

my .bah\_login has the correct patth to export in it already, mysql and  
rails are there but dont’ seem to mesh with my app until I call these  
arguments.

reguardless of wether I am logged in as root or a regular admin and  
wether or not I’ve done the sudo su command

don’t know if this is normal? or if theres something I need to do to my  
system to make it stop wiping these settings, thanks

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [March 16, 2006, 8:27pm UTC](https://www.ruby-forum.com/t/question-on-gems-on-mac-osx/55067/2 "2006-03-16T20:27:50Z")

</div>

> lately I’ve been working with ROR on a MAC OSX tiger at work, however I  
> have one huge problem with seems to be the root of all my problems  
> whenever I use terminal or iTerm to start workign with ROR. Every  
> single time I open a new terminal window or close one and open a new  
> one, I have to reapply my path from .bash\_login for Ruby and MySql, and  
> than I have to install the gems for MySql as well as Rails again every  
> single time I open or close a Terminal window. Is there anyway to make  
> these changes and install stick?

I’m using OS X tiger as well although I use zsh, but that should not  
make a difference. You don’t have to reinstall the apps all over  
again, so something else happens.

What response do you get when you do a ‘sudo’? Did you apply your  
PATH-changes to .bash\_profile?

regards  
Claus

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [March 16, 2006, 8:30pm UTC](https://www.ruby-forum.com/t/question-on-gems-on-mac-osx/55067/3 "2006-03-16T20:30:54Z")

</div>

Robert Huhn wrote:

> sudo gem install mysql – --with-mysql-dir=/usr/local/mysql  
> system to make it stop wiping these settings, thanks

I’m new to OS X, coming from linux, so I must have got lucky (mines  
working fine via iTerm). I installed ruby, mysql, postgres from  
darwinports and added the paths to ~/.profile. I don’t have a  
~/.bash\_login

Dunno the difference between .profile and .bash\_login but maybe try  
removing .bash\_login and add to .profile

Jhn

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [March 16, 2006, 8:58pm UTC](https://www.ruby-forum.com/t/question-on-gems-on-mac-osx/55067/4 "2006-03-16T20:58:43Z")

</div>

John D. wrote:

> I’m new to OS X, coming from linux, so I must have got lucky (mines  
> working fine via iTerm). I installed ruby, mysql, postgres from  
> darwinports and added the paths to ~/.profile. I don’t have a  
> ~/.bash\_login
> 
> Dunno the difference between .profile and .bash\_login but maybe try  
> removing .bash\_login and add to .profile
> 
> Jhn

Actually I have no clue about .profile… I just followed the  
instructions in the tutorial I linked… Did I mention I usually use an  
xp machine at home? I’m bascially quasi new to tiger (have used otheer  
flavors of Mac os+ os x but never for developement before), I’m going to  
try adding the paths to .profile, I assume its just another text file?

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [March 16, 2006, 9:02pm UTC](https://www.ruby-forum.com/t/question-on-gems-on-mac-osx/55067/5 "2006-03-16T21:02:07Z")

</div>

Claus G. wrote:

> I’m using OS X tiger as well although I use zsh, but that should not  
> make a difference. You don’t have to reinstall the apps all over  
> again, so something else happens.
> 
> What response do you get when you do a ‘sudo’? Did you apply your  
> PATH-changes to .bash\_profile?
> 
> regards  
> Claus

when i do a sudo command it just prompts for password than back to  
command line

I have not touched .bash\_profile I wasn’t aware it existed till now  
whoops! thanks I’ll try that

-Robert

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [March 16, 2006, 9:10pm UTC](https://www.ruby-forum.com/t/question-on-gems-on-mac-osx/55067/6 "2006-03-16T21:10:50Z")

</div>

On Mar 16, 2006, at 1:58 PM, Robert Huhn wrote:

> > Jhn
> 
> Actually I have no clue about .profile… I just followed the  
> instructions in the tutorial I linked… Did I mention I usually  
> use an  
> xp machine at home? I’m bascially quasi new to tiger (have used  
> otheer  
> flavors of Mac os+ os x but never for developement before), I’m  
> going to  
> try adding the paths to .profile, I assume its just another text file?

What’s the content of your current .bash\_profile?

–  
Jason P.  
removed\_email\_address@domain.invalid

“The key to performance is elegance, not  
battalions of special cases.”

- Jon Bentley and Doug McIlroy

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [March 16, 2006, 9:13pm UTC](https://www.ruby-forum.com/t/question-on-gems-on-mac-osx/55067/7 "2006-03-16T21:13:57Z")

</div>

On Mar 16, 2006, at 2:02 PM, Robert Huhn wrote:

> > Claus
> 
> when i do a sudo command it just prompts for password than back to  
> command line
> 
> I have not touched .bash\_profile I wasn’t aware it existed till now  
> whoops! thanks I’ll try that

Disregard my previous email. If you didn’t setup your path info  
in .bash\_profile, then that’s why you’re having issues.

–  
Jason P.  
removed\_email\_address@domain.invalid

“The key to performance is elegance, not  
battalions of special cases.”

- Jon Bentley and Doug McIlroy

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [March 16, 2006, 9:38pm UTC](https://www.ruby-forum.com/t/question-on-gems-on-mac-osx/55067/8 "2006-03-16T21:38:44Z")

</div>

> Actually I have no clue about .profile… I just followed the  
> instructions in the tutorial I linked… Did I mention I usually use an  
> xp machine at home? I’m bascially quasi new to tiger (have used otheer  
> flavors of Mac os+ os x but never for developement before), I’m going to  
> try adding the paths to .profile, I assume its just another text file?

Welcome to a new world 🙂 When you open up a terminal window you can  
type ls to get the directory listing. Doing a ‘ls -al’ will give you  
hidden files (denoted with a dot (.)).

The easiest thing is probably to edit the bash-system-wide config-file  
called in /etc/profile (ls -l /etc/profile).

Edit the file using ‘sudo pico /etc/profile’ and make your changes here:

PATH=“/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin”

Press ctrl-x and confirm your changes.

I would also suggest that you take a look at [darwinports.org](http://darwinports.org). It’s an  
easy way to install ports, and I used it to install ruby, postgresql,  
gem etc. There is a fairly easy howto at their site. I installed  
darwinports using a prefix of /usr/local (./configure  
–prefix=/usr/local) rather than the default /opt/local.

regards  
Claus

---

<div class="post-metadata">

**Author:** ![quik77](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/dec6dc/32.png) [@quik77](https://www.ruby-forum.com/u/quik77)\
**Post date:** [March 16, 2006, 10:13pm UTC](https://www.ruby-forum.com/t/question-on-gems-on-mac-osx/55067/9 "2006-03-16T22:13:53Z")

</div>

> Welcome to a new world 🙂 When you open up a terminal window you can  
> type ls to get the directory listing. Doing a ‘ls -al’ will give you  
> hidden files (denoted with a dot (.)).
> 
> The easiest thing is probably to edit the bash-system-wide config-file  
> called in /etc/profile (ls -l /etc/profile).
> 
> Edit the file using ‘sudo pico /etc/profile’ and make your changes here:
> 
> PATH=“/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin”
> 
> Press ctrl-x and confirm your changes.
> 
> I would also suggest that you take a look at [darwinports.org](http://darwinports.org). It’s an  
> easy way to install ports, and I used it to install ruby, postgresql,  
> gem etc. There is a fairly easy howto at their site. I installed  
> darwinports using a prefix of /usr/local (./configure  
> –prefix=/usr/local) rather than the default /opt/local.
> 
> regards  
> Claus

Ok thanks for all the help guys I’m gettign soem permissions errors but  
I think its working now \*crosses fingers, you’d think as an IT major at  
RIT they’d teach you somethign more than how to use ls -l heh I swear  
the only places I learn anymore are forums… oh well going ahead with my  
Event Calendar/events RSS/ company internal webapp thing

-thanks again  
-Robert
