# Passenger, switching from development to production

**URL:** <https://www.ruby-forum.com/t/passenger-switching-from-development-to-production/173155>\
**Category:** Rails\
**Created:** [August 4, 2009, 6:27am UTC](https://www.ruby-forum.com/t/passenger-switching-from-development-to-production/173155 "2009-08-04T06:27:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [August 4, 2009, 6:27am UTC](https://www.ruby-forum.com/t/passenger-switching-from-development-to-production/173155/1 "2009-08-04T06:27:53Z")

</div>

It appears my http setup is working but I am getting an error when I try  
to use a web browser to connect.

All I have done so far is to change the setting from what was working in  
httpd.conf and move it to ssl.conf (adding some ssl things) and I am  
using the same directory/set of files that was working for development.

The error…

Ruby on Rails application could not be started  
Phusion Passenger has listed more information on the error below

These are the possible causes:

```
* There may be a syntax error in the application's code. Please

```

check for such errors and fix them.  
\* A required library may not installed. Please install all libraries  
that this application requires.  
\* The application may not be properly configured. Please check  
whether all configuration files are written correctly, fix any incorrect  
configurations, and restart this application.  
\* A service that the application relies on (such as the database  
server or the Ferret search engine server) may not have been started.  
Please start that service.

Further information about the error may have been written to the  
application’s log file. Please check it in order to analyse the problem.

Error message:  
uninitialized constant Tabnav  
Exception class:  
NameError  
Application root:  
/home/craig/railserp  
Backtrace:  
# File Line Location

I’ll leave off the backtrace for now.

Was there somewhere inside the rails root that I was supposed to tell  
Rails to use production instead of development?

The weird thing is even if I just switch it from production to  
development in ssl.conf, it works, no errors.

Can anyone toss me a bone here?

Craig

–  
This message has been scanned for viruses and  
dangerous content by MailScanner, and is  
believed to be clean.

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [August 4, 2009, 7:36am UTC](https://www.ruby-forum.com/t/passenger-switching-from-development-to-production/173155/2 "2009-08-04T07:36:55Z")

</div>

On Mon, 2009-08-03 at 21:26 -0700, Craig W. wrote:

> Phusion Passenger has listed more information on the error below

* * *

never mind - I had to remove some old files I had stashed in a folder  
inside of app/models - apparently development ignores them but  
production does not ignore them.

Craig

–  
This message has been scanned for viruses and  
dangerous content by MailScanner, and is  
believed to be clean.

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [August 6, 2009, 10:15pm UTC](https://www.ruby-forum.com/t/passenger-switching-from-development-to-production/173155/3 "2009-08-06T22:15:00Z")

</div>

On Tue, Aug 4, 2009 at 12:26 AM, Craig W.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Was there somewhere inside the rails root that I was supposed to tell  
> Rails to use production instead of development?

Assuming you are using passenger with apache, the RailsEnv directive,  
which should go in the apache vhost configuration tells passenger  
which rails environment to run under.

e.g.

\<VirtualHost \*:80\>  
ServerName [yourhostname.com](http://yourhostname.com)  
DocumentRoot “/path/to/your/rails/app/public”  
RailsEnv production  
\<directory “/path/to/your/rails/app/public”\>  
Order allow,deny  
Allow from all

I haven’t used passenger with Nginx, but there’s probably something  
similar.

–  
Rick DeNatale

Blog: [http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)  
Twitter: [http://twitter.com/RickDeNatale](http://twitter.com/RickDeNatale)  
WWR: [http://www.workingwithrails.com/person/9021-rick-denatale](http://www.workingwithrails.com/person/9021-rick-denatale)  
LinkedIn: [http://www.linkedin.com/in/rickdenatale](http://www.linkedin.com/in/rickdenatale)
