Monday, December 22, 2008

在ubuntu 8.10 上安装passenger 2.0.6

Welcome to the Phusion Passenger Apache 2 module installer, v2.0.6.

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

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

1. The Apache 2 module will be installed for you.
2. You'll learn how to configure Apache.
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... found at /opt/ruby-enterprise/bin/rake
* Apache 2... found at /usr/sbin/apache2
* Apache 2 development headers... found at /usr/bin/apxs2
* Apache Portable Runtime (APR) development headers... found at /usr/bin/apr-1-config
* Apache Portable Runtime Utility (APR) development headers... found at /usr/bin/apu-1-config
* fastthread... found
* rack... found

Compiling and installing Apache 2 module...
cd /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.0.6
/opt/ruby-enterprise/bin/ruby -S rake clean apache2
/usr/bin/rake:27:in `require': no such file to load -- rake (LoadError)
from /usr/bin/rake:27

It looks like something went wrong

Please read our Users guide for troubleshooting tips:

/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.0.6/doc/Users guide.html

If that doesn't help, please use our support facilities at:

We'll do our best to help you.

require 'rubygems'
ubuntu 8.10中原来已经安装了ruby 1.8.7,与ruby-enterprise中的ruby版本不一样,需要在用户根目录下的.bashrc文件中调整一下PATH:
export PATH=/opt/ruby-enterprise/bin:$PATH

$> sudo ln -s /opt/ruby-enterprise/bin/gem /usr/bin/gem
(不要用sudo apt-get install rubygems 安装)

$> sudo vi /etc/apache2/conf.d/rails
LoadModule passenger_module /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/
PassengerRoot /opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.0.6
PassengerRuby /opt/ruby-enterprise/bin/ruby
RailsEnv development
RailsDefaultUser test

$> sudo vi /etc/apache2/sites-enabled/rails_app
<VirtualHost *:80>
DocumentRoot /somewhere/public


No comments :