Making REE default ruby interpreter?

Hi, I just installed Ruby Enterprise Edition/Passenger on my new VPS but I can't run any rake tasks (I get -bash rake: command not found).

/opt/ruby-enterprise-1.8.7-2010.01/bin/gem list

Successfully lists the installed gems (including rake)

I've been told this is because the path is not correctly setup, however I can't seem to get it working correctly.

Can anyone tell me the correct method to make REE the default interpreter?

I'm using CentOS 5.

Any advice appreciated.

Thanks.

1) Find where rake is installed

updatedb locate rake

2) Prepend the path to rake into your existing PATH.

export PATH="/path/to/rake:$PATH"

3) Make the new PATH addition permanent by adding the export command above into your shell's rc file, ~/.bashrc or ~/.bash_profile or ~/.profile.

Hi,

I just installed Ruby Enterprise Edition/Passenger on my new VPS but I

can’t run any rake tasks (I get -bash rake: command not found).

/opt/ruby-enterprise-1.8.7-2010.01/bin/gem list

Successfully lists the installed gems (including rake)

I’ve been told this is because the path is not correctly setup, however

I can’t seem to get it working correctly.

Can anyone tell me the correct method to make REE the default

interpreter?

I’m using CentOS 5.

Any advice appreciated.

Thanks.

You might want to look into using the Ruby Version Manager (RVM) for managing

multiple Ruby VM installs. You can find more information here:

http://rvm.beginrescueend.com

Good luck,

-Conrad

Hi,

I've tried doing what you said. Is this correct?

export PATH="/opt/ruby-enterprise-1.8.7-2010.01/bin:$PATH"

I tried putting it in the following file, but it didn't seem to make any difference. Does it have to be placed in a specific location?

Thanks.

# /etc/profile

# System wide environment and startup programs, for login setup # Functions and aliases go in /etc/bashrc

pathmunge () {   if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then            if [ "$2" = "after" ] ; then               PATH=$PATH:$1            else               PATH=$1:$PATH            fi   fi }

# ksh workaround if [ -z "$EUID" -a -x /usr/bin/id ]; then         EUID=`id -u`         UID=`id -ru` fi

# Path manipulation if [ "$EUID" = "0" ]; then         pathmunge /sbin         pathmunge /usr/sbin         pathmunge /usr/local/sbin fi # No core files by default ulimit -S -c 0 > /dev/null 2>&1

if [ -x /usr/bin/id ]; then         USER="`id -un`"         LOGNAME=$USER         MAIL="/var/spool/mail/$USER" fi

HOSTNAME=`/bin/hostname` HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then     INPUTRC=/etc/inputrc fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do     if [ -r "$i" ]; then         . $i     fi done

unset i

Nevermind, got it.

Thanks for your help.