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
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.
After installing the missing headers, go back to the beginning and recompile passenger:
gem install passenger
Try uninstalling ruby1.9 and installing ruby1.8 instead then reinstall the passenger gem. This worked for me.
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
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.
Related
When running my app on a distant server, I get the following message :
!!! no internal routing support, rebuild with pcre support !!!
Using ruby on rails and Apache/2.4.12
Don't know how to fix it
Got the same error, I solved it by:
installing libpcre development libraries
debian: apt-get install libpcre3 libpcre3-dev
redhat: yum install pcre pcre-devel
After that, reinstalled the uwsgi gem:
gem uninstall uwsgi
gem install uwsgi
Lets share your result with us
I'm trying to execute passenger-install-apache2-module but it is not working.
My Command Results:
$ passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v4.0.24.
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...
* Checking for C compiler...
Found: yes
Location: /usr/bin/gcc
* Checking for C++ compiler...
Found: yes
Location: /usr/bin/g++
* Checking for Curl development headers with SSL support...
Found: no
Error: Cannot find the `curl-config` command.
* Checking for OpenSSL development headers...
Found: yes
Location: /usr/include/openssl/ssl.h
* Checking for Zlib development headers...
Found: yes
Location: /usr/include/zlib.h
* Checking for Ruby development headers...
Found: yes
Location: /home/hemant/.rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby.h
* Checking for OpenSSL support for Ruby...
Found: yes
* Checking for RubyGems...
Found: yes
* Checking for Rake (associated with /home/hemant/.rbenv/versions/2.0.0-p247/bin/ruby)...
Found: yes
Location: /home/hemant/.rbenv/versions/2.0.0-p247/bin/ruby /home/hemant/.rbenv/versions/2.0.0-p247/bin/rake
* Checking for rack...
Found: yes
* Checking for Apache 2...
Found: no
* Checking for Apache 2 development headers...
Found: no
* Checking for Apache Portable Runtime (APR) development headers...
Found: no
* Checking for Apache Portable Runtime Utility (APU) development headers...
Found: no
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.
--------------------------------------------
Installation instructions for required software
* To install Curl development headers with SSL support:
Please run apt-get install libcurl4-openssl-dev or libcurl4-gnutls-dev, whichever you prefer.
* To install Apache 2:
Please install it with apt-get install apache2-mpm-worker
* To install Apache 2 development headers:
Please install it with apt-get install apache2-threaded-dev
* To install Apache Portable Runtime (APR) development headers:
Please install it with apt-get install libapr1-dev
* To install Apache Portable Runtime Utility (APU) development headers:
Please install it with apt-get install libaprutil1-dev
If the aforementioned instructions didn't solve your problem, then please take
a look at the Users Guide:
/home/hemant/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/passenger-4.0.24/doc/Users guide Apache.html
http://www.modrails.com/documentation/Users%20guide%20Apache.html
And I tried to run apt-get install libcurl4-openssl-dev.
$ sudo apt-get install libcurl4-openssl-dev
[sudo] password for hemant:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libcurl4-openssl-dev : Depends: libcurl3 (= 7.29.0-1ubuntu3.1) but 7.29.0-1ubuntu3.2 is to be installed
Depends: libldap2-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Here's my system versions.
$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [i686-linux]
$ gem -v
2.1.11
rvm -v
rvm 1.23.16 (master) by Wayne E. Seguin <wayneeseguin#gmail.com>, Michal Papis <mpapis#gmail.com> [https://rvm.io/]
$ rails -v
Rails 4.0.1.rc4
$ bundle -v
Bundler version 1.3.5
Can anyone please help me on this matter? :(
Plus I'm having this problem! :(
$ require_relative '../spec_helper'
WARNING:root:could not open file '/etc/apt/sources.list.d/passenger.list'
require_relative: command not found
According to your log, it seems that Apache2 is not installed.
* Checking for Apache 2...
Found: no
If it is, could you provide its version ?
I formatted my computer and transferred all my RoR applications to my new Lubuntu System.
I had Ubuntu with Unity. (still a linux system). I have installed rvm, ruby, rails, and they all work fine! I then run "bundle install" before actually running "rails s" to test my app.
This is what I get
Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at https://github.com/carlhuda/bundler/issues so that we can fix it. Please include the full output of the command, your Gemfile and Gemfile.lock. Thanks!
/home/user/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- openssl (LoadError)
Any help ?
This is what sudo apt-get install openssl gives me:
Reading package lists... Done
Building dependency tree
Reading state information... Done
openssl is already the newest version.
The following packages were automatically installed and are no longer required:
libreadline-gplv2-dev git-man libncurses5-dev libnspr4-0d libtinfo-dev git libreadline5 zlib1g-dev liberror-perl libsqlite3-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Did you install the packages before installing the ruby version with RVM?
Try removing the ruby version, running
sudo apt-get install libssl-dev openssl
and then install ruby version again
Tried to install Passenger with Nginx (on EC2 Linux). I'm using ec2-user (instead of Root). Ruby 1.9.2 with RVM.
Passenger gem installs correctly.
But when I try:
passenger-install-nginx-module
I get:
Checking for required software...
* GNU C++ compiler... not found
* The 'make' tool... found at /usr/bin/make
* A download tool like 'wget' or 'curl'... found at /usr/bin/wget
* Ruby development headers... found
* OpenSSL support for Ruby... not found
* RubyGems... found
* Rake... found at /home/ec2-user/.rvm/wrappers/ruby-1.9.2-p180/rake
* rack... found
* Curl development headers with SSL support... not found
* OpenSSL development headers... not found
* Zlib development headers... not found
Although the above exist. for instance if I type:
$> gcc
$> gcc: no input files
Saw somewhere online that I can try using:
rvmsudo passenger-install-nginx-module
but I get a problem:
--------------------------------------------
Checking for required software...
* GNU C++ compiler... not found
* The 'make' tool... found at /usr/bin/make
* A download tool like 'wget' or 'curl'... found at /usr/bin/wget
* Ruby development headers... found
* OpenSSL support for Ruby... not found
* RubyGems... found
Unable to locate the RVM path. Your RVM installation is probably too old. Please update it with 'rvm update --head && rvm reload && rvm repair all'.
Any ideas?
you have to do this:
rvm remove 1.9.2
rvm pkg install openssl
rvm install 1.9.2 --with-openssl-dir=$HOME/.rvm/usr
Be sure that a compiler and all dependency libraries are present on the system before attempting to install Rubies and/or Passenger. You can obtain a list of recommended base dependencies for Ruby based applications by running the following command.
user$ rvm requirements
Install all dependencies listed for 'ruby' before attempting to install the interpreter?
The list varies by OS.
More information can be found on the RVM basics documentation page, https://rvm.io/rvm/basics/
~Wayne
Unable to locate the RVM path.
That could be a symptom of not adding:
[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"
to your .bashrc (or profile or whatever). That can cause all kinds of weird problems.
Am using ruby-1.9.2-p180 with rvm.
cd ~/.rvm/src/ruby-1.9.2-p180/ext/openssl/
ruby extconf.rb
make
make install
passenger-install-gninx-module
gcc is the wrong executable, Passenger is looking for g++ . Install it with this:
sudo yum install gcc-c++
and passenger-install-nginx-module should stop complaining about gcc missing
i'm trying to set up a ruby on rails environment to run a website app (clocking it)
unfortunely as I'm a kind of newbie lots of stuff going wrong :p
this is what i got when i run /var/lib/gems/1.8/gems/passenger-3.0.2/bin# ./passenger-install-apache2-module
> * 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
> /usr/bin/rake * rack... not 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
Ok so i just miss rack, so i do this:
gem install rack --source http://chneukirchen.org/releases/gems/
Successfully installed rack-1.2.1
1 gem installed
Installing ri documentation for rack-1.2.1...
Installing RDoc documentation for rack-1.2.1...
everyhting looks ok but i still have the same problem
rack is still not found by passenger, how can i solve this ?
other thing I don't understand how to update gem ??
# gem update --system
ERROR: While executing gem ... (RuntimeError)
gem update --system is disabled on Debian. RubyGems can be updated using the official Debian repositories by aptitude or apt-get.
any help is welcome !
I would to follow your how-to but first i need to remove packages installed with aptitude, do you know in this list which ones I need to remove ? this is all the stuff I apt-get since i try to install ruby ...
> aptitude install git-core
> aptitude install libssl-dev zlib1g-dev build-essential
> mysql-server mysql-client
> libmysql-ruby libmysqlclient-dev
> imagemagick libmagick9-dev
> librmagick-ruby librmagick-ruby1.8
> libxslt1-dev
> aptitude install rubygems
> aptitude install ruby1.8-dev
> aptitude install rubygems1.9
> aptitude install rake
> aptitude install rubygems
> aptitude install ruby libzlib-ruby rdoc irb
> aptitude install rubygems1.9
> aptitude install libyaml-ruby
> aptitude install libzlib-ruby
> aptitude install libcurl4-openssl-dev
> aptitude install libopenssl-ruby
> aptitude install apache2-prefork-dev
> aptitude install libapr1-dev
> aptitude install ibaprutil1-dev
Your first mistake was installing RubyGems from apt. I cover the proper way to set this all up in my Ubuntu, Ruby, RVM, Rails and You post. Give that a go and see if that helps you get passenger running.