views:

573

answers:

2

Hi, I've just had a new VPS set up and have installed Passenger with Ruby Enterprise Edition. However, I can't get rake to work.

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

* LOCAL GEMS *

actionmailer (2.3.5, 2.2.3)
actionpack (2.3.5, 2.2.3)
activerecord (2.3.5, 2.2.3)
activeresource (2.3.5, 2.2.3)
activesupport (2.3.5, 2.2.3)
fastthread (1.0.7)
formtastic (0.9.7)
justinfrench-formtastic (0.2.4)
mysql (2.8.1)
passenger (2.2.9)
rack (1.1.0, 1.0.1)
rails (2.3.5, 2.2.3)
rails-settings (1.0.0)
rake (0.8.7)
sqlite3-ruby (1.2.5)

When I try and run a rake task, I get:

-bash: rake: command not found

Can anyone help?

Any advice appreciated.

Thanks.

+1  A: 

I've been using REE for about a year and have always had this problem, which I've always handled by doing this:

cd /usr/local/bin
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/ruby
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/gem
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/irb
sudo ln -s /opt/ruby-enterprise-1.8.7-2010.01/bin/rake

I also had to do this for additional binaries installed by gems. Just for reference, I'm using Ubuntu.

Alternatively, you can modify your environment's path (which would save you from having to create symlinks for new binaries), but I prefer this method as I run scripts as different users and don't want to modify everyone's path.

Alex Reisner
A: 

'Had the same problem, after doing "gem install rake".

Fixed this by doing "sudo apt-get install rake".

broofa