Apache with Passenger doesn't load Rails app

I'm developing a Rails app and am trying to configure the web server it's deployed on. My problem is that the page doesn't load.

In Apache's error.log there are no errors and in my app's log/production.log only the line(s) Connecting to database specified by database.yml appears.

I have no index.html in app's public folder and the application works fine in the development environment.

I'm using an Amazon instance with Ubuntu 12.04 and I've installed ruby through RVM. In my httpd.conf I have:

LoadModule passenger_module /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
PassengerRoot /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17
PassengerRuby /home/ubuntu/.rvm/wrappers/ruby-1.9.3-p194/ruby

Apache starts without errors.

Below there is my sites-available/default:

# other virtualhosts

<VirtualHost *:80>
    ServerName my_app.mydomain.com
    ServerAdmin mail@mail.com

    DocumentRoot /home/ubuntu/public_html/my_app/current/public

    <Directory /home/ubuntu/public_html/my_app/current/public>
        Allow from all
        Options -MultiViews

    ErrorLog ${APACHE_LOG_DIR}/error.log

What should I do now to get passenger working?


I decided to reinstall Ruby and all the other stuff and moving to nginx. Finally now I have all working (both in ngnix and apache). This is what I've done, if someone cares:

Ruby + Rails

Install ruby + rails via RVM

curl -L https://get.rvm.io | bash -s stable --rails

Load rvm in all opened shells

source ~/.rvm/scripts/rvm

Install gem

gem install passenger

Install apache and passenger module

rvmsudo passenger-install-apache2-module

Copy these lines to /etc/apache2/httpd.conf

LoadModule passenger_module /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
PassengerRoot /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17
PassengerRuby /home/ubuntu/.rvm/wrappers/ruby-1.9.3-p194/ruby

Install nginx and passenger module

rvmsudo passenger-install-nginx-module

Copy these lines to /opt/nginx/conf/nginx.conf

passenger_root /home/ubuntu/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17;
passenger_ruby /home/ubuntu/.rvm/wrappers/ruby-1.9.3-p194/ruby;

Setup a script to allow you to control Nginx

wget -O init-deb.sh http://library.linode.com/assets/660-init-deb.sh
sudo mv init-deb.sh /etc/init.d/nginx
sudo chmod +x /etc/init.d/nginx
sudo /usr/sbin/update-rc.d -f nginx defaults

You can now control Nginx with this script

sudo /etc/init.d/nginx stop
sudo /etc/init.d/nginx start
Final setup with nodejs

One of the other things you’ll want is Node.js. This will help you do the compiling of assets on deployments

sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get -y update
sudo apt-get -y install nodejs

Need Your Help

Open GL Lighting Problem

c++ opengl lighting

I've been working on a game engine for a month now, and I've finished the basic OpenGL stuff. However, the one thing that I can't get to work like I expect it to is the lighting.

Input sprite hover with transition problems

css button css-transitions sprite

I would like to know, how you can add a transition when I hover my button. I have made it as a sprite. with two separate images I can make the transition... Is there a good way to make this happen ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.