Apache Passenger installation, Ruby development headers not found

I have a RoR application that should be hosted on Apache, so I'm 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 he asked me to run the following command:

sudo apt-get install ruby1.8-dev

and I did it 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 that asks me to run:

sudo apt-get install ruby1.8-dev
+5
source share
5 answers

If, like me, you use 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

It worked for me. Hope this helps.

+12
source

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

gem install passenger
+2

ruby1.9 ruby1.8, . .

+2

:

  • 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 installing gem:

gem install passenger

And successfully configure it:

sudo passenger-install-apache2-module
+1
source

I found that with some Passenger requirements, you need to log out and then return to the current user after you installed them before the passenger-apache2 module recognizes the changed configuration.

0
source

All Articles