Cannot Display RoR Application - Safari Can't Connect To The Server

14 views
Skip to first unread message

LightBe Corp

unread,
Feb 21, 2012, 3:12:50 PM2/21/12
to Phusion Passenger Discussions
Here are my entries in httpd.conf renaming the server name (domain
name), actual user and Rails application folder.

LoadModule passenger_module /Users/serveruser/.rvm/gems/ruby-1.9.2-
p290/gems/passenger-3.0.11/ext/apache2/mod_passenger.so
PassengerRoot /Users/serveruser/.rvm/gems/ruby-1.9.2-p290/gems/
passenger-3.0.11
PassengerRuby /Users/serveruser/.rvm/wrappers/ruby-1.9.2-p290/ruby

# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

<VirtualHost *:80>
ServerName www.mydomain.com
DocumentRoot /Users/serveruser/Sites/myapp/public # <-- be sure
to point to 'public'!
RailsEnv "development"
<Directory /Users/serveruser/Sites/myapp/public>
AllowOverride all # <-- relax Apache security
settings
Options -MultiViews # <-- MultiViews must be turned
off
Order allow,deny
Allow from all
</Directory>
CustomLog "/Users/serveruser/Sites/myapp/log/access_log" combined
ErrorLog "/Users/serveruser/Sites/myapp/log/error_log"
</VirtualHost>

Here are my entries in httpd-vhosts.conf renaming the server name
(domain name), actual user and Rails application folder.

<VirtualHost *:80>
ServerName localhost
DocumentRoot /Users/serveruser/Sites/
RewriteEngine On
DefaultType text/html
<Directory "/Users/server1/Sites">
DefaultType text/html
Options +ExecCGI FollowSymLinks Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

I initially did what was mentioned in the Railscasts video without
updating httpd-vhosts.conf. When I could not execute the Rails
application I ended up doing web searches and adding other things
hoping to get it to work but to no avail.

I am attempting to run this on a Mac Mini using Lion Server. I do not
have an entry in the Web service for domain www.mydomain.com. The
domain is a GoDaddy one. I have it pointing to the IP address of our
server. I am running Rails 3.2.1. This application works when I run
using localhost:3000.

The other websites in the Web service work fine. Any help would be
appreciated. I could not find anything in the Passenger documentation
for this problem.

Hongli Lai

unread,
Feb 21, 2012, 4:19:23 PM2/21/12
to phusion-...@googlegroups.com
On Tue, Feb 21, 2012 at 9:12 PM, LightBe Corp <cont...@lightbe.com> wrote:
>   DocumentRoot /Users/serveruser/Sites/myapp/public    # <-- be sure
> to point to 'public'!
>   RailsEnv "development"
>   <Directory /Users/serveruser/Sites/myapp/public>
>      AllowOverride all              # <-- relax Apache security
> settings
>      Options -MultiViews            # <-- MultiViews must be turned
> off

You need to put comments on their own lines instead of next to an option.

--
Phusion | Ruby & Rails deployment, scaling and tuning solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)

LightBe Corp

unread,
Feb 22, 2012, 11:16:02 AM2/22/12
to Phusion Passenger Discussions
I removed the comment lines as suggested by Hongli and performed the
rake assets command recommended by Michael. I'm not getting the error
I first wrote about. However I am having other issues that may be
past this forum. If I have all the services off in Web service I have
gotten two errors. The first time I got was a rails error stating
that the postgres server was not up. That I expected since Wiki or
Profile Manager must be on for postgresql to be launched. However the
next time I started it back up and shut it down I got a one line error
message in red saying Sorry, an error has occurred or something like
that. The text in the title also included (500) at the end.

One question I am not sure about and could not find on the Passenger
website For Passenger to work on a Mac server does the Web service
need to be turned on? I ask because the first time when I got the
Rails error it was not turned on.

There is a major problem with the Lion Web service that Apple is aware
of. I will contact them again.

The code that I used in httpd.conf causes problems with accessing
anything with localhost. I even commented out the line pointing to
the virtual host file. I currently use phpPGadmin to check out my
postgresql database. I do not know if this is a problem with the
Passenger code I added or if it is also a problem I am having with the
Web service. When I comment out the code I am able to access
localhost again.

Unfortunately I still cannot connect to the application. It is
probably some madness related to the Lion server software.

Thanks so much for your suggestions.

Hongli Lai

unread,
Feb 22, 2012, 11:37:58 AM2/22/12
to phusion-...@googlegroups.com
Maybe you haven't correctly configured your production database.yml
config? Phusion Passenger runs your app in the 'production' RAILS_ENV
by default, not 'development'. Check your Apache global error log and
your Rails production.log for any error details.

> --
> You received this message because you are subscribed to the Google Groups "Phusion Passenger Discussions" group.
> To post to this group, send email to phusion-...@googlegroups.com.
> To unsubscribe from this group, send email to phusion-passen...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/phusion-passenger?hl=en.

Tyler DeWitt

unread,
Feb 22, 2012, 11:44:31 AM2/22/12
to phusion-...@googlegroups.com
Could this be related in any way to the fact that Mac installs apache is some weird directory structure and therefore Passenger is compiled against a different version of apache, installed somewhere else?
Reply all
Reply to author
Forward
0 new messages