Forum: Ruby on Rails Question on gems on Mac OSX

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
0d821bf7d4028b84a6838062db0e9ce0?d=identicon&s=25 Robert Huhn (quik77)
on 2006-03-16 20:04
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
http://hivelogic.com/articles/2005/12/01/ruby_rail...

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
B8d11b4c89cfc6e34d6c9fb121c9acac?d=identicon&s=25 Claus Guttesen (Guest)
on 2006-03-16 20:27
(Received via mailing list)
> 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
C27e9fe209955cdd75f249e7466302e9?d=identicon&s=25 John Dell (Guest)
on 2006-03-16 20:30
(Received via mailing list)
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
0d821bf7d4028b84a6838062db0e9ce0?d=identicon&s=25 Robert Huhn (quik77)
on 2006-03-16 20:58
John Dell 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?
0d821bf7d4028b84a6838062db0e9ce0?d=identicon&s=25 Robert Huhn (quik77)
on 2006-03-16 21:02
Claus Guttesen 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
2899cec9af525f7953e19c8210aca97c?d=identicon&s=25 Jason Perkins (Guest)
on 2006-03-16 21:10
(Received via mailing list)
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 Perkins
jperkins@sneer.org

"The key to performance is elegance, not
  battalions of special cases."
  - Jon Bentley and Doug McIlroy
2899cec9af525f7953e19c8210aca97c?d=identicon&s=25 Jason Perkins (Guest)
on 2006-03-16 21:13
(Received via mailing list)
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 Perkins
jperkins@sneer.org

"The key to performance is elegance, not
  battalions of special cases."
  - Jon Bentley and Doug McIlroy
B8d11b4c89cfc6e34d6c9fb121c9acac?d=identicon&s=25 Claus Guttesen (Guest)
on 2006-03-16 21:38
(Received via mailing list)
> 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. 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
0d821bf7d4028b84a6838062db0e9ce0?d=identicon&s=25 Robert Huhn (quik77)
on 2006-03-16 22:13
>
> 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. 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
This topic is locked and can not be replied to.