Hi,
I am trying to follow this tutorial, on the subject of compiling ruby and rubygems on Snow Leopard:
http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard
I have added this to my ~/.profile:
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
But if I write: echo $PATH I get:
/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin
But in tutorial it says:
You should see /usr/local/bin at the beginning of the line returned by the system.
I have installed macports sometime ago and plenty of other software, perhaps it has changed the path.
Anyway, I have tried to proceed with the installation, so I have built ruby, I did:
./configure --enable-shared --enable-pthread CFLAGS=-D_XOPEN_SOURCE=1
make
sudo make install
cd ..
But when I do which ruby I get:
/usr/bin/ruby
And according to the tutorial that's wrong. Also if I do ruby -v I get the older version of ruby that was preinstalled on Snow Leopard and not the one I've compiled.
Thanks.
UPD:
This is content of my ~/.profile:
export PYTHONPATH="/Users/m/djangocode:$PYTHONPATH"
alias hibernateon="sudo pmset -a hibernatemode 5"
alias hibernateoff="sudo pmset -a hibernatemode 3"
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
I have deleted ~/.bash_profile, so it has no impact.
Here is the content of /etc/bashrc:
# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
and /etc/profile:
# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
I think their contents are Mac OS X defaults. I never touched these.
If I open terminal up and type echo $PATH I still get:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin
But if I do: source ~/.profile then I get what I need:
misha-macbookpro:~ m$ . ~/.profile
misha-macbookpro:~ m$ echo $PATH
/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin
And there is no ~/.bashrc file.
It seems that ~/.profile doesn't get "sourced" on terminal's start up. What can cause that?
-
set something like this in your
~/.bash_profile:PATH=/usr/local/bin:/opt/local/bin:/opt/local/sbin:$PATHMacPorts is already changing your
$PATHin that file, so make your modifications there (MacPorts is the/opt/localtree)gryzzly : thank you, indeed it was the line from ~/.bash_profile (I deleted it, since I don't have MacPorts installed anymore and I don't use it, I use Homebrew).From serverninja -
Where you able to solve the problem? I followed the same instructions and i am having the same problems. Thanks
From Bulcanan
0 comments:
Post a Comment