Created
June 30, 2011 23:22
-
-
Save whartonn/1057535 to your computer and use it in GitHub Desktop.
Phusion Passenger errors with multi-user RVM, nginx, rails 3.0.9 & ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ -s "/usr/local/rvm/environments/ruby-1.9.2-p136@fat" ]] ; then | |
. "/usr/local/rvm/environments/ruby-1.9.2-p136@fat" | |
else | |
rvm --create use "ruby-1.9.2-p136@fat" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
passenger_root /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7; | |
passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.2-p136@fat/ruby; | |
the old nginx.conf had: | |
passenger_root /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2; | |
passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.2-p136/ruby; | |
so I'm not sure that this is right.. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rvm info | |
ruby-1.9.2-p136@fat: | |
system: | |
uname: "Linux ip-10-170-178-152 2.6.31-302-ec2 #7-Ubuntu SMP Tue Oct 13 19:06:04 UTC 2009 i686 GNU/Linux" | |
bash: "/bin/bash => GNU bash, version 4.0.33(1)-release (i486-pc-linux-gnu)" | |
zsh: " => not installed" | |
rvm: | |
version: "rvm 1.2.5 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/]" | |
ruby: | |
interpreter: "ruby" | |
version: "1.9.2p136" | |
date: "2010-12-25" | |
platform: "i686-linux" | |
patchlevel: "2010-12-25 revision 30365" | |
full_version: "ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]" | |
homes: | |
gem: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat" | |
ruby: "/usr/local/rvm/rubies/ruby-1.9.2-p136" | |
binaries: | |
ruby: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/ruby" | |
irb: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/irb" | |
gem: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/gem" | |
rake: "/usr/local/rvm/gems/ruby-1.9.2-p136@global/bin/rake" | |
environment: | |
PATH: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat/bin:/usr/local/rvm/gems/ruby-1.9.2-p136@global/bin:/usr/local/rvm/rubies/ruby-1.9.2-p136/bin:/usr/local/rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" | |
GEM_HOME: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat" | |
GEM_PATH: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat:/usr/local/rvm/gems/ruby-1.9.2-p136@global" | |
MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-1.9.2-p136" | |
IRBRC: "/usr/local/rvm/rubies/ruby-1.9.2-p136/.irbrc" | |
RUBYOPT: "" | |
gemset: "fat" | |
ubuntu@ip-10-170-178-152:/usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems$ gem install passenger | |
Fetching: passenger-3.0.7.gem (100%) | |
Successfully installed passenger-3.0.7 | |
1 gem installed | |
Installing ri documentation for passenger-3.0.7... | |
Installing RDoc documentation for passenger-3.0.7... | |
ubuntu@ip-10-170-178-152:/usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems$ rvm info | |
ruby-1.9.2-p136@fat: | |
system: | |
uname: "Linux ip-10-170-178-152 2.6.31-302-ec2 #7-Ubuntu SMP Tue Oct 13 19:06:04 UTC 2009 i686 GNU/Linux" | |
bash: "/bin/bash => GNU bash, version 4.0.33(1)-release (i486-pc-linux-gnu)" | |
zsh: " => not installed" | |
rvm: | |
version: "rvm 1.2.5 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/]" | |
ruby: | |
interpreter: "ruby" | |
version: "1.9.2p136" | |
date: "2010-12-25" | |
platform: "i686-linux" | |
patchlevel: "2010-12-25 revision 30365" | |
full_version: "ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]" | |
homes: | |
gem: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat" | |
ruby: "/usr/local/rvm/rubies/ruby-1.9.2-p136" | |
binaries: | |
ruby: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/ruby" | |
irb: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/irb" | |
gem: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/gem" | |
rake: "/usr/local/rvm/gems/ruby-1.9.2-p136@global/bin/rake" | |
environment: | |
PATH: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat/bin:/usr/local/rvm/gems/ruby-1.9.2-p136@global/bin:/usr/local/rvm/rubies/ruby-1.9.2-p136/bin:/usr/local/rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" | |
GEM_HOME: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat" | |
GEM_PATH: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat:/usr/local/rvm/gems/ruby-1.9.2-p136@global" | |
MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-1.9.2-p136" | |
IRBRC: "/usr/local/rvm/rubies/ruby-1.9.2-p136/.irbrc" | |
RUBYOPT: "" | |
gemset: "fat" | |
ubuntu@ip-10-170-178-152:/usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems$ ls -al | |
total 24 | |
drwxrwsr-x 6 ubuntu rvm 4096 2011-06-30 23:43 . | |
drwxrwsr-x 7 ubuntu rvm 4096 2011-06-30 23:42 .. | |
drwxrwsr-x 4 ubuntu rvm 4096 2011-06-30 23:42 daemon_controller-0.2.6 | |
drwxrwsr-x 5 ubuntu rvm 4096 2011-06-30 23:42 fastthread-1.0.7 | |
drwxrwsr-x 14 ubuntu rvm 4096 2011-07-01 00:12 passenger-3.0.7 | |
drwxrwsr-x 7 ubuntu rvm 4096 2011-06-30 23:42 rack-1.3.0 | |
ubuntu@ip-10-170-178-152:/usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems$ cd passenger-3.0.7/ | |
ubuntu@ip-10-170-178-152:/usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7$ ./bin/passenger-install-nginx-module | |
Welcome to the Phusion Passenger Nginx module installer, v3.0.7. | |
This installer will guide you through the entire installation process. It | |
shouldn't take more than 5 minutes in total. | |
Here's what you can expect from the installation process: | |
1. This installer will compile and install Nginx with Passenger support. | |
2. You'll learn how to configure Passenger in Nginx. | |
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++ | |
* 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... found | |
* RubyGems... found | |
* Rake... found at /usr/local/rvm/wrappers/ruby-1.9.2-p136@fat/rake | |
* rack... found | |
* Curl development headers with SSL support... found | |
* OpenSSL development headers... found | |
* Zlib development headers... found | |
-------------------------------------------- | |
Automatically download and install Nginx? | |
Nginx doesn't support loadable modules such as some other web servers do, | |
so in order to install Nginx with Passenger support, it must be recompiled. | |
Do you want this installer to download, compile and install Nginx for you? | |
1. Yes: download, compile and install Nginx for me. (recommended) | |
The easiest way to get started. A stock Nginx 1.0.0 with Passenger | |
support, but with no other additional third party modules, will be | |
installed for you to a directory of your choice. | |
2. No: I want to customize my Nginx installation. (for advanced users) | |
Choose this if you want to compile Nginx with more third party modules | |
besides Passenger, or if you need to pass additional options to Nginx's | |
'configure' script. This installer will 1) ask you for the location of | |
the Nginx source code, 2) run the 'configure' script according to your | |
instructions, and 3) run 'make install'. | |
Whichever you choose, if you already have an existing Nginx configuration file, | |
then it will be preserved. | |
Enter your choice (1 or 2) or press Ctrl-C to abort: 1 | |
-------------------------------------------- | |
Downloading Nginx... | |
# wget -O /tmp/ubuntu-passenger-11715/nginx.tar.gz http://sysoev.ru/nginx/nginx-1.0.0.tar.gz | |
--2011-07-01 00:14:14-- http://sysoev.ru/nginx/nginx-1.0.0.tar.gz | |
Resolving sysoev.ru... 81.19.68.137 | |
Connecting to sysoev.ru|81.19.68.137|:80... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 654760 (639K) [application/octet-stream] | |
Saving to: `/tmp/ubuntu-passenger-11715/nginx.tar.gz' | |
100%[=====================================================================================================>] 654,760 194K/s in 3.3s | |
2011-07-01 00:14:18 (194 KB/s) - `/tmp/ubuntu-passenger-11715/nginx.tar.gz' saved [654760/654760] | |
Extracting Nginx source tarball... | |
# tar xzvf /tmp/ubuntu-passenger-11715/nginx.tar.gz | |
nginx-1.0.0/ | |
... | |
blah blah blah... | |
... | |
nginx-1.0.0/src/os/unix/rfork_thread.S | |
-------------------------------------------- | |
Where do you want to install Nginx to? | |
Please specify a prefix directory [/opt/nginx]: | |
-------------------------------------------- | |
Permission problems | |
This installer must be able to write to the following directory: | |
/opt/nginx | |
But it can't do that, because you're running the installer as ubuntu. | |
Please re-run this installer as root. | |
ubuntu@ip-10-170-178-152:/usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'rails', '3.0.9' | |
# rake 0.9.0 is broken (should work with rails 3.0.8) | |
gem 'rake', '~> 0.8.7' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3-ruby', :require => 'sqlite3' | |
group :staging, :production do | |
# use postgresql remotely | |
gem 'pg' | |
end | |
group :development do | |
# access rspec generators | |
# gem 'rspec-rails' | |
end | |
group :test do | |
# gem 'rspec' | |
gem 'webrat' | |
end | |
group :development, :test do | |
# gem 'autotest' | |
# gem 'autotest-rails-pure' | |
# mac-only | |
# gem 'autotest-fsevent' | |
# gem 'autotest-growl' | |
end | |
# Use unicorn as the web server | |
# gem 'unicorn' | |
# Deploy with Capistrano | |
gem 'capistrano' | |
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+) | |
# gem 'ruby-debug' | |
# gem 'ruby-debug19', :require => 'ruby-debug' | |
# Bundle the extra gems: | |
# gem 'bj' | |
# gem 'nokogiri' | |
# gem 'sqlite3-ruby', :require => 'sqlite3' | |
# gem 'aws-s3', :require => 'aws/s3' | |
gem 'rvm' | |
gem 'devise', '1.3.4' | |
gem 'devise_invitable' | |
gem "oa-oauth", :require => "omniauth/oauth" | |
gem 'omniauth' | |
gem 'jquery-rails' | |
gem 'uuidtools' | |
gem 'grackle' | |
gem 'fb_graph' | |
gem 'factory_girl' | |
gem 'attr_encrypted' | |
gem 'will_paginate', '~> 3.0.pre2' | |
# queue strategies | |
gem 'delayed_job' | |
gem 'resque' | |
gem 'redis' | |
# gem 'client_side_validations' | |
# images | |
gem "paperclip", "~> 2.3" | |
# sensors | |
# gem "nikeplus-ruby", :git => 'https://github.com/bob-p/nikeplus-ruby.git' | |
gem "fitbit" | |
# better IRB experience | |
gem 'wirble' | |
gem 'awesome_print' | |
gem 'httparty' | |
gem 'mush' | |
# Bundle gems for the local environment. Make sure to | |
# put test-only gems in this group so their generators | |
# and rake tasks are available in development mode: | |
# group :development, :test do | |
# gem 'webrat' | |
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>rvm use 1.9.2@fat | |
Using /usr/local/rvm/gems/ruby-1.9.2-p136 with gemset fat | |
>rvm info | |
ruby-1.9.2-p136@fat: | |
system: | |
uname: "Linux ip-10-170-178-152 2.6.31-302-ec2 #7-Ubuntu SMP Tue Oct 13 19:06:04 UTC 2009 i686 GNU/Linux" | |
bash: "/bin/bash => GNU bash, version 4.0.33(1)-release (i486-pc-linux-gnu)" | |
zsh: " => not installed" | |
rvm: | |
version: "rvm 1.2.5 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/]" | |
ruby: | |
interpreter: "ruby" | |
version: "1.9.2p136" | |
date: "2010-12-25" | |
platform: "i686-linux" | |
patchlevel: "2010-12-25 revision 30365" | |
full_version: "ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux]" | |
homes: | |
gem: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat" | |
ruby: "/usr/local/rvm/rubies/ruby-1.9.2-p136" | |
binaries: | |
ruby: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/ruby" | |
irb: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/irb" | |
gem: "/usr/local/rvm/rubies/ruby-1.9.2-p136/bin/gem" | |
rake: "/usr/local/rvm/gems/ruby-1.9.2-p136@global/bin/rake" | |
environment: | |
PATH: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat/bin:/usr/local/rvm/gems/ruby-1.9.2-p136@global/bin:/usr/local/rvm/rubies/ruby-1.9.2-p136/bin:/usr/local/rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" | |
GEM_HOME: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat" | |
GEM_PATH: "/usr/local/rvm/gems/ruby-1.9.2-p136@fat:/usr/local/rvm/gems/ruby-1.9.2-p136@global" | |
MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-1.9.2-p136" | |
IRBRC: "/usr/local/rvm/rubies/ruby-1.9.2-p136/.irbrc" | |
RUBYOPT: "" | |
gemset: "fat" | |
gem install passenger | |
Fetching: fastthread-1.0.7.gem (100%) | |
Building native extensions. This could take a while... | |
Fetching: daemon_controller-0.2.6.gem (100%) | |
Fetching: rack-1.3.0.gem (100%) | |
Fetching: passenger-3.0.7.gem (100%) | |
Successfully installed fastthread-1.0.7 | |
Successfully installed daemon_controller-0.2.6 | |
Successfully installed rack-1.3.0 | |
Successfully installed passenger-3.0.7 | |
4 gems installed | |
>cd /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7 | |
>sudo ./bin/passenger-install-nginx-module | |
>sudo ./bin/passenger-install-nginx-module | |
Welcome to the Phusion Passenger Nginx module installer, v3.0.7. | |
This installer will guide you through the entire installation process. It | |
shouldn't take more than 5 minutes in total. | |
Here's what you can expect from the installation process: | |
1. This installer will compile and install Nginx with Passenger support. | |
2. You'll learn how to configure Passenger in Nginx. | |
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++ | |
* 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... found | |
* RubyGems... found | |
* Rake... found at /usr/bin/rake | |
* rack... found | |
* Curl development headers with SSL support... found | |
* OpenSSL development headers... found | |
* Zlib development headers... found | |
-------------------------------------------- | |
Automatically download and install Nginx? | |
Nginx doesn't support loadable modules such as some other web servers do, | |
so in order to install Nginx with Passenger support, it must be recompiled. | |
Do you want this installer to download, compile and install Nginx for you? | |
1. Yes: download, compile and install Nginx for me. (recommended) | |
The easiest way to get started. A stock Nginx 1.0.0 with Passenger | |
support, but with no other additional third party modules, will be | |
installed for you to a directory of your choice. | |
2. No: I want to customize my Nginx installation. (for advanced users) | |
Choose this if you want to compile Nginx with more third party modules | |
besides Passenger, or if you need to pass additional options to Nginx's | |
'configure' script. This installer will 1) ask you for the location of | |
the Nginx source code, 2) run the 'configure' script according to your | |
instructions, and 3) run 'make install'. | |
Whichever you choose, if you already have an existing Nginx configuration file, | |
then it will be preserved. | |
Enter your choice (1 or 2) or press Ctrl-C to abort: 1 | |
-------------------------------------------- | |
Downloading Nginx... | |
# wget -O /tmp/root-passenger-6127/nginx.tar.gz http://sysoev.ru/nginx/nginx-1.0.0.tar.gz | |
--2011-06-30 23:46:31-- http://sysoev.ru/nginx/nginx-1.0.0.tar.gz | |
Resolving sysoev.ru... 81.19.68.137 | |
Connecting to sysoev.ru|81.19.68.137|:80... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 654760 (639K) [application/octet-stream] | |
Saving to: `/tmp/root-passenger-6127/nginx.tar.gz' | |
100%[=====================================================================================================>] 654,760 190K/s in 3.4s | |
2011-06-30 23:46:35 (190 KB/s) - `/tmp/root-passenger-6127/nginx.tar.gz' saved [654760/654760] | |
Extracting Nginx source tarball... | |
# tar xzvf /tmp/root-passenger-6127/nginx.tar.gz | |
nginx-1.0.0/ | |
nginx-1.0.0/auto/ | |
nginx-1.0.0/auto/cc/ | |
... blah blah blah ... | |
nginx-1.0.0/src/os/unix/rfork_thread.S | |
-------------------------------------------- | |
Where do you want to install Nginx to? | |
Please specify a prefix directory [/opt/nginx]: | |
-------------------------------------------- | |
Compiling Passenger support files... | |
# /usr/bin/ruby1.8 /usr/bin/rake nginx:clean nginx RELEASE=yes | |
(in /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7) | |
rm -rf ext/common/libboost_oxt.a ext/common/libboost_oxt | |
rm -rf ext/common/libpassenger_common.a ext/common/libpassenger_common | |
rm -f agents/PassengerWatchdog agents/PassengerLoggingAgent | |
rm -rf agents/nginx/PassengerHelperAgent | |
mkdir -p ext/common/libboost_oxt | |
g++ -Iext -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/common/libboost_oxt/aggregate.o -c ext/common/libboost_oxt/aggregate.cpp | |
mkdir -p ext/common/libboost_oxt | |
rm -rf ext/common/libboost_oxt.a | |
ar cru ext/common/libboost_oxt.a ext/common/libboost_oxt/aggregate.o | |
ranlib ext/common/libboost_oxt.a | |
mkdir -p ext/common/libpassenger_common | |
g++ -Iext -Iext/common -Iext/libev -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -o ext/common/libpassenger_common/aggregate.o -c ext/common/libpassenger_common/aggregate.cpp | |
rm -rf ext/common/libpassenger_common.a | |
ar cru ext/common/libpassenger_common.a ext/common/libpassenger_common/aggregate.o | |
ranlib ext/common/libpassenger_common.a | |
mkdir -p agents/nginx | |
g++ ext/nginx/HelperAgent.cpp -o agents/nginx/PassengerHelperAgent -Iext -Iext/common -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/libboost_oxt.a -lpthread -rdynamic | |
g++ ext/common/Watchdog.cpp -o agents/PassengerWatchdog -Iext -Iext/common -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/libboost_oxt.a -lpthread -rdynamic | |
cd ext/libev/ && sh /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/ext/libev/configure --disable-shared --enable-static | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... /bin/mkdir -p | |
checking for gawk... no | |
checking for mawk... mawk | |
checking whether make sets $(MAKE)... yes | |
checking whether to enable maintainer-specific portions of Makefiles... no | |
checking for a BSD-compatible install... /usr/bin/install -c | |
checking build system type... i686-pc-linux-gnu | |
checking host system type... i686-pc-linux-gnu | |
checking for style of include used by make... GNU | |
checking for gcc... gcc | |
checking for C compiler default output file name... a.out | |
checking whether the C compiler works... yes | |
checking whether we are cross compiling... no | |
checking for suffix of executables... | |
checking for suffix of object files... o | |
checking whether we are using the GNU C compiler... yes | |
checking whether gcc accepts -g... yes | |
checking for gcc option to accept ISO C89... none needed | |
checking dependency style of gcc... none | |
checking for a sed that does not truncate output... /bin/sed | |
checking for grep that handles long lines and -e... /bin/grep | |
checking for egrep... /bin/grep -E | |
checking for ld used by gcc... /usr/bin/ld | |
checking if the linker (/usr/bin/ld) is GNU ld... yes | |
checking for /usr/bin/ld option to reload object files... -r | |
checking for BSD-compatible nm... /usr/bin/nm -B | |
checking whether ln -s works... yes | |
checking how to recognize dependent libraries... pass_all | |
checking how to run the C preprocessor... gcc -E | |
checking for ANSI C header files... yes | |
checking for sys/types.h... yes | |
checking for sys/stat.h... yes | |
checking for stdlib.h... yes | |
checking for string.h... yes | |
checking for memory.h... yes | |
checking for strings.h... yes | |
checking for inttypes.h... yes | |
checking for stdint.h... yes | |
checking for unistd.h... yes | |
checking dlfcn.h usability... yes | |
checking dlfcn.h presence... yes | |
checking for dlfcn.h... yes | |
checking for g++... g++ | |
checking whether we are using the GNU C++ compiler... yes | |
checking whether g++ accepts -g... yes | |
checking dependency style of g++... none | |
checking how to run the C++ preprocessor... g++ -E | |
checking for g77... no | |
checking for xlf... no | |
checking for f77... no | |
checking for frt... no | |
checking for pgf77... no | |
checking for cf77... no | |
checking for fort77... no | |
checking for fl32... no | |
checking for af77... no | |
checking for xlf90... no | |
checking for f90... no | |
checking for pgf90... no | |
checking for pghpf... no | |
checking for epcf90... no | |
checking for gfortran... no | |
checking for g95... no | |
checking for xlf95... no | |
checking for f95... no | |
checking for fort... no | |
checking for ifort... no | |
checking for ifc... no | |
checking for efc... no | |
checking for pgf95... no | |
checking for lf95... no | |
checking for ftn... no | |
checking whether we are using the GNU Fortran 77 compiler... no | |
checking whether accepts -g... no | |
checking the maximum length of command line arguments... 1572864 | |
checking command to parse /usr/bin/nm -B output from gcc object... ok | |
checking for objdir... .libs | |
checking for ar... ar | |
checking for ranlib... ranlib | |
checking for strip... strip | |
checking if gcc supports -fno-rtti -fno-exceptions... no | |
checking for gcc option to produce PIC... -fPIC | |
checking if gcc PIC flag -fPIC works... yes | |
checking if gcc static flag -static works... yes | |
checking if gcc supports -c -o file.o... yes | |
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes | |
checking dynamic linker characteristics... GNU/Linux ld.so | |
checking how to hardcode library paths into programs... immediate | |
checking whether stripping libraries is possible... yes | |
checking if libtool supports shared libraries... yes | |
checking whether to build shared libraries... no | |
checking whether to build static libraries... yes | |
configure: creating libtool | |
appending configuration tag "CXX" to libtool | |
checking for ld used by g++... /usr/bin/ld | |
checking if the linker (/usr/bin/ld) is GNU ld... yes | |
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes | |
checking for g++ option to produce PIC... -fPIC | |
checking if g++ PIC flag -fPIC works... yes | |
checking if g++ static flag -static works... yes | |
checking if g++ supports -c -o file.o... yes | |
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes | |
checking dynamic linker characteristics... GNU/Linux ld.so | |
(cached) (cached) checking how to hardcode library paths into programs... immediate | |
appending configuration tag "F77" to libtool | |
checking sys/inotify.h usability... yes | |
checking sys/inotify.h presence... yes | |
checking for sys/inotify.h... yes | |
checking sys/epoll.h usability... yes | |
checking sys/epoll.h presence... yes | |
checking for sys/epoll.h... yes | |
checking sys/event.h usability... no | |
checking sys/event.h presence... no | |
checking for sys/event.h... no | |
checking sys/queue.h usability... yes | |
checking sys/queue.h presence... yes | |
checking for sys/queue.h... yes | |
checking port.h usability... no | |
checking port.h presence... no | |
checking for port.h... no | |
checking poll.h usability... yes | |
checking poll.h presence... yes | |
checking for poll.h... yes | |
checking sys/select.h usability... yes | |
checking sys/select.h presence... yes | |
checking for sys/select.h... yes | |
checking sys/eventfd.h usability... yes | |
checking sys/eventfd.h presence... yes | |
checking for sys/eventfd.h... yes | |
checking sys/signalfd.h usability... yes | |
checking sys/signalfd.h presence... yes | |
checking for sys/signalfd.h... yes | |
checking for inotify_init... yes | |
checking for epoll_ctl... yes | |
checking for kqueue... no | |
checking for port_create... no | |
checking for poll... yes | |
checking for select... yes | |
checking for eventfd... yes | |
checking for signalfd... yes | |
checking for clock_gettime... no | |
checking for clock_gettime syscall... yes | |
checking for nanosleep... yes | |
checking for ceil in -lm... yes | |
configure: creating ./config.status | |
config.status: creating Makefile | |
config.status: creating config.h | |
config.status: executing depfiles commands | |
rm -f ext/libev//libev.la | |
cd ext/libev/ && make libev.la | |
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -O3 -c -o ev.lo ev.c | |
gcc -DHAVE_CONFIG_H -I. -g -O2 -O3 -c ev.c -o ev.o | |
ev.c: In function 'evpipe_write': | |
ev.c:1236: warning: ignoring return value of 'write', declared with attribute warn_unused_result | |
ev.c:1240: warning: ignoring return value of 'write', declared with attribute warn_unused_result | |
ev.c: In function 'pipecb': | |
ev.c:1257: warning: ignoring return value of 'read', declared with attribute warn_unused_result | |
ev.c:1263: warning: ignoring return value of 'read', declared with attribute warn_unused_result | |
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -O3 -c -o event.lo event.c | |
gcc -DHAVE_CONFIG_H -I. -g -O2 -O3 -c event.c -o event.o | |
/bin/bash ./libtool --tag=CC --mode=link gcc -g -O2 -O3 -version-info 3:0 -o libev.la -rpath /usr/local/lib ev.lo event.lo -lm | |
mkdir .libs | |
ar cru .libs/libev.a ev.o event.o | |
ranlib .libs/libev.a | |
creating libev.la | |
(cd .libs && rm -f libev.la && ln -s ../libev.la libev.la) | |
g++ ext/common/LoggingAgent/Main.cpp -o agents/PassengerLoggingAgent -Iext -Iext/common -Iext/libev -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<hash_fun.h>" -DHAS_SFENCE -DHAS_LFENCE -Wall -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/libboost_oxt.a ext/libev/.libs/libev.a -lcurl -lz -lpthread -rdynamic | |
mkdir -p 'ext/ruby/ruby-1.8.7-x86-linux/' | |
cd 'ext/ruby/ruby-1.8.7-x86-linux/' && /usr/bin/ruby1.8 '/usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/ext/ruby/extconf.rb' | |
checking for alloca.h... yes | |
checking for ruby/io.h... no | |
creating Makefile | |
cd 'ext/ruby/ruby-1.8.7-x86-linux/' && make | |
gcc -I. -I/usr/lib/ruby/1.8/i486-linux -I/usr/lib/ruby/1.8/i486-linux -I/usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/ext/ruby -DHAVE_ALLOCA_H -D_FILE_OFFSET_BITS=64 -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -g -c /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/ext/ruby/passenger_native_support.c | |
gcc -shared -o passenger_native_support.so passenger_native_support.o -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8 | |
-------------------------------------------- | |
Compiling and installing Nginx... | |
# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --add-module='/usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/ext/nginx' | |
checking for OS | |
+ Linux 2.6.31-302-ec2 i686 | |
checking for C compiler ... found | |
+ using GNU C compiler | |
+ gcc version: 4.4.1 (Ubuntu 4.4.1-4ubuntu9) | |
checking for gcc -pipe switch ... found | |
checking for gcc builtin atomic operations ... found | |
... blah blah ... | |
checking for struct dirent.d_namlen ... not found | |
checking for struct dirent.d_type ... found | |
Configuration summary | |
+ using system PCRE library | |
+ using system OpenSSL library | |
+ md5: using OpenSSL library | |
+ sha1 library is not used | |
+ using system zlib library | |
nginx path prefix: "/opt/nginx" | |
nginx binary file: "/opt/nginx/sbin/nginx" | |
nginx configuration prefix: "/opt/nginx/conf" | |
nginx configuration file: "/opt/nginx/conf/nginx.conf" | |
nginx pid file: "/opt/nginx/logs/nginx.pid" | |
nginx error log file: "/opt/nginx/logs/error.log" | |
nginx http access log file: "/opt/nginx/logs/access.log" | |
nginx http client request body temporary files: "client_body_temp" | |
nginx http proxy temporary files: "proxy_temp" | |
nginx http fastcgi temporary files: "fastcgi_temp" | |
nginx http uwsgi temporary files: "uwsgi_temp" | |
nginx http scgi temporary files: "scgi_temp" | |
# make | |
make -f objs/Makefile | |
make[1]: Entering directory `/tmp/root-passenger-6127/nginx-1.0.0' | |
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \ | |
-o objs/src/core/nginx.o \ | |
src/core/nginx.c | |
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs \ | |
-o objs/src/core/ngx_log.o \ | |
src/core/ngx_log.c | |
... blah blah.. | |
3.0.7/ext/nginx/../common/libpassenger_common.a /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/ext/nginx/../common/libboost_oxt.a -lstdc++ -lpthread -lpcre -lssl -lcrypto -ldl -lz | |
make[1]: Leaving directory `/tmp/root-passenger-6127/nginx-1.0.0' | |
make -f objs/Makefile manpage | |
make[1]: Entering directory `/tmp/root-passenger-6127/nginx-1.0.0' | |
sed -e "s|%%PREFIX%%|/opt/nginx|" \ | |
-e "s|%%PID_PATH%%|/opt/nginx/logs/nginx.pid|" \ | |
-e "s|%%CONF_PATH%%|/opt/nginx/conf/nginx.conf|" \ | |
-e "s|%%ERROR_LOG_PATH%%|/opt/nginx/logs/error.log|" \ | |
< man/nginx.8 > objs/nginx.8 | |
make[1]: Leaving directory `/tmp/root-passenger-6127/nginx-1.0.0' | |
# make install | |
make -f objs/Makefile install | |
make[1]: Entering directory `/tmp/root-passenger-6127/nginx-1.0.0' | |
test -d '/opt/nginx' || mkdir -p '/opt/nginx' | |
test -d '/opt/nginx/sbin' || mkdir -p '/opt/nginx/sbin' | |
test ! -f '/opt/nginx/sbin/nginx' || mv '/opt/nginx/sbin/nginx' '/opt/nginx/sbin/nginx.old' | |
cp objs/nginx '/opt/nginx/sbin/nginx' | |
test -d '/opt/nginx/conf' || mkdir -p '/opt/nginx/conf' | |
cp conf/koi-win '/opt/nginx/conf' | |
cp conf/koi-utf '/opt/nginx/conf' | |
cp conf/win-utf '/opt/nginx/conf' | |
test -f '/opt/nginx/conf/mime.types' || cp conf/mime.types '/opt/nginx/conf' | |
cp conf/mime.types '/opt/nginx/conf/mime.types.default' | |
test -f '/opt/nginx/conf/fastcgi_params' || cp conf/fastcgi_params '/opt/nginx/conf' | |
cp conf/fastcgi_params '/opt/nginx/conf/fastcgi_params.default' | |
test -f '/opt/nginx/conf/fastcgi.conf' || cp conf/fastcgi.conf '/opt/nginx/conf' | |
cp conf/fastcgi.conf '/opt/nginx/conf/fastcgi.conf.default' | |
test -f '/opt/nginx/conf/uwsgi_params' || cp conf/uwsgi_params '/opt/nginx/conf' | |
cp conf/uwsgi_params '/opt/nginx/conf/uwsgi_params.default' | |
test -f '/opt/nginx/conf/scgi_params' || cp conf/scgi_params '/opt/nginx/conf' | |
cp conf/scgi_params '/opt/nginx/conf/scgi_params.default' | |
test -f '/opt/nginx/conf/nginx.conf' || cp conf/nginx.conf '/opt/nginx/conf/nginx.conf' | |
cp conf/nginx.conf '/opt/nginx/conf/nginx.conf.default' | |
test -d '/opt/nginx/logs' || mkdir -p '/opt/nginx/logs' | |
test -d '/opt/nginx/logs' || mkdir -p '/opt/nginx/logs' | |
test -d '/opt/nginx/html' || cp -r html '/opt/nginx' | |
test -d '/opt/nginx/logs' || mkdir -p '/opt/nginx/logs' | |
make[1]: Leaving directory `/tmp/root-passenger-6127/nginx-1.0.0' | |
-------------------------------------------- | |
Nginx with Passenger support was successfully installed. | |
Please edit your Nginx configuration file (probably /opt/nginx/conf/nginx.conf), | |
and set the passenger_root and passenger_ruby configuration options in the | |
'http' block, like this: | |
http { | |
... | |
passenger_root /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7; | |
passenger_ruby /usr/bin/ruby1.8; | |
... | |
} | |
After you (re)start Nginx, you are ready to deploy any number of Ruby on Rails | |
applications on Nginx. | |
Press ENTER to continue. | |
-------------------------------------------- | |
Deploying a Ruby on Rails application: an example | |
Suppose you have a Ruby on Rails application in /somewhere. Add a server block | |
to your Nginx configuration file, set its root to /somewhere/public, and set | |
'passenger_enabled on', like this: | |
server { | |
listen 80; | |
server_name www.yourhost.com; | |
root /somewhere/public; # <--- be sure to point to 'public'! | |
passenger_enabled on; | |
} | |
And that's it! You may also want to check the Users Guide for security and | |
optimization tips and other useful information: | |
/usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/doc/Users guide Nginx.html | |
Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-) | |
http://www.modrails.com/ | |
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui. | |
ubuntu@ip-10-170-178-152:/usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ruby (Rack) application could not be started | |
Error message: | |
You have already activated rack 1.3.0, but your Gemfile requires rack 1.2.3. Consider using bundle exec. | |
Exception class: | |
Gem::LoadError | |
Application root: | |
/var/www/fat/current | |
Backtrace: | |
# File Line Location | |
0 /usr/local/rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/runtime.rb 31 in `block in setup' | |
1 /usr/local/rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/spec_set.rb 12 in `block in each' | |
2 /usr/local/rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/spec_set.rb 12 in `each' | |
3 /usr/local/rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/spec_set.rb 12 in `each' | |
4 /usr/local/rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/runtime.rb 17 in `setup' | |
5 /usr/local/rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler.rb 107 in `setup' | |
6 /usr/local/rvm/gems/ruby-1.9.2-p136@global/gems/bundler-1.0.10/lib/bundler/setup.rb 6 in `' | |
7 lib/rubygems/custom_require> 33:in `require' | |
8 lib/rubygems/custom_require> 33:in `rescue in require' | |
9 lib/rubygems/custom_require> 29:in `require' | |
10 /var/www/fat/releases/20110630230421/config/boot.rb 6 in `' | |
11 lib/rubygems/custom_require> 29:in `require' | |
12 lib/rubygems/custom_require> 29:in `require' | |
13 /var/www/fat/releases/20110630230421/config/application.rb 4 in `' | |
14 lib/rubygems/custom_require> 29:in `require' | |
15 lib/rubygems/custom_require> 29:in `require' | |
16 /var/www/fat/releases/20110630230421/config/environment.rb 2 in `' | |
17 lib/rubygems/custom_require> 29:in `require' | |
18 lib/rubygems/custom_require> 29:in `require' | |
19 config.ru 3 in `block in ' | |
20 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/rack-1.3.0/lib/rack/builder.rb 51 in `instance_eval' | |
21 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/rack-1.3.0/lib/rack/builder.rb 51 in `initialize' | |
22 config.ru 1 in `new' | |
23 config.ru 1 in `' | |
24 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/rack/application_spawner.rb 222 in `eval' | |
25 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/rack/application_spawner.rb 222 in `load_rack_app' | |
26 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/rack/application_spawner.rb 156 in `block in initialize_server' | |
27 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/utils.rb 572 in `report_app_init_status' | |
28 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/rack/application_spawner.rb 153 in `initialize_server' | |
29 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb 204 in `start_synchronously' | |
30 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb 180 in `start' | |
31 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/rack/application_spawner.rb 128 in `start' | |
32 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb 253 in `block (2 levels) in spawn_rack_application' | |
33 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add' | |
34 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb 246 in `block in spawn_rack_application' | |
35 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb 82 in `block in synchronize' | |
36 prelude> 10:in `synchronize' | |
37 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize' | |
38 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb 244 in `spawn_rack_application' | |
39 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb 137 in `spawn_application' | |
40 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application' | |
41 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb 357 in `server_main_loop' | |
42 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/lib/phusion_passenger/abstract_server.rb 206 in `start_synchronously' | |
43 /usr/local/rvm/gems/ruby-1.9.2-p136@fat/gems/passenger-3.0.7/helper-scripts/passenger-spawn-server 99 in `' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cd/etc/init.d | |
$ cat nginx | |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon | |
### END INIT INFO | |
PATH=/opt/nginx/sbin:/sbin:/bin:/usr/sbin:/usr/bin | |
DAEMON=/opt/nginx/sbin/nginx | |
NAME=nginx | |
DESC=nginx | |
test -x $DAEMON || exit 0 | |
# Include nginx defaults if available | |
if [ -f /etc/default/nginx ] ; then | |
. /etc/default/nginx | |
fi | |
set -e | |
case "$1" in | |
start) | |
echo -n "Starting $DESC: " | |
start-stop-daemon --start --quiet --pidfile /opt/nginx/logs/$NAME.pid \ | |
--exec $DAEMON -- $DAEMON_OPTS | |
echo "$NAME." | |
;; | |
stop) | |
echo -n "Stopping $DESC: " | |
start-stop-daemon --stop --quiet --pidfile /opt/nginx/logs/$NAME.pid \ | |
--exec $DAEMON | |
echo "$NAME." | |
;; | |
restart|force-reload) | |
echo -n "Restarting $DESC: " | |
start-stop-daemon --stop --quiet --pidfile \ | |
/opt/nginx/logs/$NAME.pid --exec $DAEMON | |
sleep 1 | |
start-stop-daemon --start --quiet --pidfile \ | |
/opt/nginx/logs/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS | |
echo "$NAME." | |
;; | |
reload) | |
echo -n "Reloading $DESC configuration: " | |
start-stop-daemon --stop --signal HUP --quiet --pidfile /opt/nginx/logs/$NAME.pid \ | |
--exec $DAEMON | |
echo "$NAME." | |
;; | |
*) | |
N=/etc/init.d/$NAME | |
echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 | |
exit 1 | |
;; | |
esac | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www-data www-data; | |
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
#passenger_log_level 3; | |
passenger_root /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2; | |
passenger_ruby /usr/local/rvm/wrappers/ruby-1.9.2-p136/ruby; | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; | |
gzip on; | |
server { | |
listen 80; | |
server_name us-west-1.compute.amazonaws.com; | |
rails_env production; | |
root /var/www/fat/current/public; | |
passenger_enabled on; | |
index index.html index.htm; | |
client_max_body_size 50M; | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root html; | |
} | |
} | |
# HTTPS server | |
# | |
server { | |
rails_env production; | |
listen 443; | |
server_name us-west-1.compute.amazonaws.com; | |
ssl on; | |
ssl_certificate /etc/ssl/certs/unsigned_bhi_ssl.crt; | |
ssl_certificate_key /etc/ssl/private/unsigned_bhi_ssl.key; | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv2 SSLv3 TLSv1; | |
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; | |
ssl_prefer_server_ciphers on; | |
root /var/www/fat/current/public; | |
passenger_enabled on; | |
passenger_use_global_queue on; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ruby (Rack) application could not be started | |
no such file to load -- rack | |
Exception class: | |
LoadError | |
Application root: | |
/var/www/fat/current | |
Backtrace: | |
# File Line Location | |
0 lib/rubygems/custom_require> 29:in `require' | |
1 lib/rubygems/custom_require> 29:in `require' | |
2 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/rack/application_spawner.rb 219 in `load_rack_app' | |
3 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/rack/application_spawner.rb 156 in `block in initialize_server' | |
4 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/utils.rb 564 in `report_app_init_status' | |
5 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/rack/application_spawner.rb 153 in `initialize_server' | |
6 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb 204 in `start_synchronously' | |
7 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb 180 in `start' | |
8 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/rack/application_spawner.rb 128 in `start' | |
9 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb 253 in `block (2 levels) in spawn_rack_application' | |
10 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add' | |
11 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb 246 in `block in spawn_rack_application' | |
12 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb 82 in `block in synchronize' | |
13 prelude> 10:in `synchronize' | |
14 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize' | |
15 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb 244 in `spawn_rack_application' | |
16 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb 137 in `spawn_application' | |
17 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/spawn_manager.rb 275 in `handle_spawn_application' | |
18 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb 357 in `server_main_loop' | |
19 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/lib/phusion_passenger/abstract_server.rb 206 in `start_synchronously' | |
20 /usr/local/rvm/gems/ruby-1.9.2-p136/gems/passenger-3.0.2/helper-scripts/passenger-spawn-server 99 in `' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm') | |
begin | |
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME'])) | |
rvm_lib_path = File.join(rvm_path, 'lib') | |
$LOAD_PATH.unshift rvm_lib_path | |
require 'rvm' | |
RVM.use_from_path! File.dirname(File.dirname(__FILE__)) | |
rescue LoadError | |
# RVM is unavailable at this point. | |
raise "RVM ruby lib is currently unavailable." | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment