Mohit Jain
Mohit Jain

Reputation: 43939

Problem in installing Passenger

I am getting this issue.

 passenger-install-apache2-module

Already installed Apache2 and passenger gem

    /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/lib/phusion_passenger/platform_info/apache.rb:277:in `_unmemoized_apr_config_needed_for_building_apache_modules?': undefined local variable or method `test_exe_outdir' for PhusionPassenger::PlatformInfo:Module (NameError)
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/lib/phusion_passenger/platform_info.rb:92:in `apr_config_needed_for_building_apache_modules?'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/bin/passenger-install-apache2-module:69:in `dependencies'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/lib/phusion_passenger/abstract_installer.rb:166:in `check_dependencies'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/bin/passenger-install-apache2-module:90:in `install!'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/lib/phusion_passenger/abstract_installer.rb:63:in `start'
        from /usr/lib/ruby/gems/1.8/gems/passenger-3.0.6/bin/passenger-install-apache2-module:236
        from /usr/bin/passenger-install-apache2-module:19:in `load'
        from /usr/bin/passenger-install-apache2-module:19

Upvotes: 1

Views: 2415

Answers (3)

douyw
douyw

Reputation: 4074

This issue had been fixed, see the first comment at here: http://code.google.com/p/phusion-passenger/issues/detail?id=653 and https://github.com/henare/passenger/compare/issue-653

In fact, just need to edit the ".../apache.rb" file, and replace "test_exe_outdir" with "tmpexedir".

Upvotes: 1

Mohit Jain
Mohit Jain

Reputation: 43939

Here is the solution:--

  1. Compile the passenger source code. You can download it from here

    To install Passenger from source code, extract the source tarball:

    tar xzvf passenger-X.X.X.tar.gz
    

    Then run the included installer:

    ./passenger-X.X.X/bin/passenger-install-apache2-module
    

    passenger-install will notify about the missing dependencies. Install them

  2. You may get an issue that ssl is not installed if you are using ruby 1.9.2. Try this:-

    cd to : /usr/local/src/ruby-1.9.2-p00/ext/openssl (or whatever)  
    sudo ruby extconf.rb
    make install 
    
  3. run the previous command ie

     ./passenger-X.X.X/bin/passenger-install-apache2-module
    

and it will work like a charm. :-)

Upvotes: 0

tadman
tadman

Reputation: 211580

This might be a bug in the Passenger installer, but it only seems to be triggered if either apr-config or apu-config are missing. These are part of the apr package, or apr-devel on some systems where the development version is optional.

When it starts up and displays diagnostics it should show something like this:

Checking for required software...

 * GNU C++ compiler... found at /usr/bin/g++
 * Curl development headers with SSL support... found
 * OpenSSL development headers... found
 * Zlib development headers... found
 * Ruby development headers... found
 * OpenSSL support for Ruby... found
 * RubyGems... found
 * Rake... found at /opt/local/rvm/wrappers/ree-1.8.7-2011.03/rake
 * rack... found
 * Apache 2... found at /usr/sbin/httpd
 * Apache 2 development headers... found at /usr/sbin/apxs
 * Apache Portable Runtime (APR) development headers... found at /usr/bin/apr-1-config
 * Apache Portable Runtime Utility (APU) development headers... found at /usr/bin/apu-1-config

If it crashes before getting to that point, you can coach the installer on which APR and APU to use with command line options.

I can't get 3.0.6 to install under Ruby 1.8.7 either, it's trashed during the C++ compile phase, so I can't replicate this problem. I haven't had trouble before, though.

Upvotes: 0

Related Questions