Question on gems on Mac OSX

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

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

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

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

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?

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

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.
[email protected]

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

  • Jon Bentley and Doug McIlroy

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.
[email protected]

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

  • Jon Bentley and Doug McIlroy

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 :slight_smile: 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. 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

Welcome to a new world :slight_smile: 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. 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