1

I have done the following in an attempt to host a Rails 3.2.3 application using Apache 2.2.21 and Passenger 3.0.13:

  1. Installed gem Passenger
  2. rvmsudo passenger-install-apache2-module
  3. Added website info in /etc/apache2/extra/httpd-vhosts.conf
  4. Added line to /etc/hosts (not sure if this was needed or not; not mentioned in Passenger documentation
  5. Uncommented out the line in /etc/apache2/httpd.conf to Include /etc/apache2/extra/httpd-vhosts.conf
  6. Restarted Apache

When I try to pull up my website the following displays:

Index of /

    Name    Last modified   Size    Description

Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.10 with Suhosin-Patch Phusion_Passenger/3.0.13 Server at lightbesandbox2.com Port 443

Here is /etc/hosts entry for the website:

127.0.0.1   www.lightbesandbox2.com

Here is my /etc/apache2/extra/httpd-vhosts.conf entry for the website:

NameVirtualHost *:80

<VirtualHost *:80>
  ServerName www.lightbesandbox2.com
  ServerAlias lightbesandbox2.com
  PassengerAppRoot /Users/server1/Sites/iktusnetlive_RoR/ 
  DocumentRoot /Users/server1/Sites/iktusnetlive_RoR/public    
  <Directory /Users/server1/Sites/iktusnetlive_RoR/public>
    AllowOverride all
    Options -MultiViews
  </Directory>
</VirtualHost>

When I do rvmsudo passenger-status I get the following output:

----------- General information -----------
max      = 6
count    = 1
active   = 0
inactive = 1
Waiting on global queue: 0

----------- Application groups -----------
/Users/server1/Sites/iktusnetlive_RoR/:
  App root: /Users/server1/Sites/iktusnetlive_RoR/
  * PID: 8140    Sessions: 0    Processed: 2       Uptime: 20m 51s

None of my assets are in the public folder in my Rails app. I have written an application using the template presented in Michael Hartl's Ruby on Rails Tutorial. The home page is in /app/views/static_pages/home.html.erb. I decided to copy an index.html file in the public folder to see if it would display. It displayed as I had hoped..

Is there a way to get Passenger to find my assets without me having to rewrite my application?

Any help would be appreciated.

Update 6/23/2012 10:00 am CDT GMT-6

I corrected the problems with my file and have successfully executed the rake assets:precompile command. I still get the index page as before. I have made no other changes. I did a passenger-status command and it is still loaded. Restarting Apache did nothing. According to what the documentation stated that should restart the Rails application.

Update 7/14/2012 6:19 pm CDT GMT-6

I just realized that I did not update this. I tried different things including precompiling the assets. I was having other problems unrelated to this so I decided to wipe out my Mac Mini server and start over. I was finally able to get my application hosted on the server using Passenger. However when I did I lost the capability to use phpPgAdmin. It no longer finds the default folder nor /var/empty. Not sure what is going on but I ended up installed PgAdmin (which I despise) but at least I can manage the PostgreSQL database. Hopefully I can get this issue resolved.

1 Answer 1

1

Have you precompiled your assets?

1
  • This is my first production deployment:) When pushing to Heroku I would get an precompile error on $grayMediumLight (using Bootstrap & LESS). I got the same error when I tried to rake assets:precompile. I assume there is another command that Heroku does to get around this error because the website works as expected. I don't know what that command is. Right now the Heroku website matches what is on my server so I will not see prompts to figure out the command they use. Thanks for your help. Jun 23, 2012 at 13:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .