Wael Said Emara
Wael Said Emara

Reputation: 55

Installing Apache Passenger , Ruby Development Headers Not Found

I have a RoR app that needs to be hosted on Apache, so I have been trying to install Apache Passenger. When I run the following command:

sudo passenger-install-apache2-module

I get:

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... not found
 * OpenSSL support for Ruby... found
 * RubyGems... found
 * Rake... found at /usr/local/bin/rake
 * rack... found
 * 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 (APU) development headers... found at /usr/bin/apu-1-config

So it asked me to run the following command:

sudo apt-get install ruby1.8-dev

and I have done this with the following result

Reading package lists... Done
Building dependency tree       
Reading state information... Done
ruby1.8-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.

So when I run:

sudo passenger-install-apache2-module

I get the same result asking me to run:

sudo apt-get install ruby1.8-dev

Upvotes: 5

Views: 7875

Answers (5)

First install packages:

  • for Ubuntu:

    sudo apt-get install libcurl4-gnutls-dev
    sudo apt-get install apache2-dev
    
  • for CentOS (good tutorial):

    yum install curl-devel apache2-devel 
    

After install gem:

gem install passenger

And successfully configurate it:

sudo passenger-install-apache2-module

Upvotes: 1

ben
ben

Reputation: 21

Try uninstalling ruby1.9 and installing ruby1.8 instead then reinstall the passenger gem. This worked for me.

Upvotes: 2

mattl
mattl

Reputation: 2242

If, like me, you are running the apt package ruby1.9.1 instead of 1.8 then install ruby1.9.1-dev instead

sudo apt-get install ruby1.9.1-dev

This worked for me. Hope it helps.

Upvotes: 13

Noddinoff
Noddinoff

Reputation: 93

After installing the missing headers, go back to the beginning and recompile passenger:

gem install passenger

Upvotes: 2

Mark Weston
Mark Weston

Reputation: 1163

I have found that with some Passenger requirements you need to log out of and then log back into the current user after you've installed them before passenger-install-apache2-module recognises the changed configuration.

Upvotes: 0

Related Questions