views:

169

answers:

3

Okay, so I installed rvm and everything as root. Then I installed Ruby Enterprise Edition with rvm.

Now I've been having a TON of issues with rake and rvm so far and I'm not too sure as to why.

I had to manually create links in my /usr/local/bin to rake to get rake working.

But when I passenger-install-nginx-module

Welcome to the Phusion Passenger Nginx module installer, v2.2.15.

This installer will guide you through the entire installation process. It
shouldn't take more than 5 minutes in total.

Here's what you can expect from the installation process:

 1. This installer will compile and install Nginx with Passenger support.
 2. You'll learn how to configure Passenger in Nginx.
 3. You'll learn how to deploy a Ruby on Rails application.

Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.

Press Enter to continue, or Ctrl-C to abort.


--------------------------------------------

Checking for required software...

 * GNU C++ compiler... found at /usr/bin/g++
 * Ruby development headers... found
 * OpenSSL support for Ruby... found
 * RubyGems... found
 * Rake... not found
 * rack... found
 * OpenSSL development headers... found
 * Zlib development headers... found

Some required software is not installed.
But don't worry, this installer will tell you how to install them.

Press Enter to continue, or Ctrl-C to abort.

But rake is in my path

root@li84-12:/usr/bin# rake
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
/usr/local/rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile'
(See full trace by running task with --trace)

Ideas anyone? This is getting in the way of my clients project =\

+1  A: 

Try using a different tool instead of rake... maybe shovel or broom.

Disclaimer: I know this isn't a valid answer, just sending out some bad humor.

Steven
+1  A: 

Try Passenger 3. It has much improved RVM support.

Hongli
+2  A: 

I ran into the same thing and the following comment on the googlecode thread was insightful.

http://code.google.com/p/phusion-passenger/issues/detail?id=227#c8

Short version - it looks for rake in the same directory that your ruby binary is installed (and not in your $PATH). The quick and dirty fix was to drop a symlink in place for rake into the ruby bin directory.

Eg.

Ruby Binary = /usr/local/bin/ruby

Rake Binary = /usr/local/lib/ruby/gems/1.8/bin/rake

ln -s /usr/local/lib/ruby/gems/1.8/bin/rake /usr/local/bin/

That seemed to do the trick in my case.

shreddd