Forum: Ruby on Rails Development mode using production database

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
contact (Guest)
on 2005-11-22 22:03
(Received via mailing list)
I have two instances of lighttpd running on my server, both running the
RubyOnRails app. The configuration for each instance of lighttpd is
the same except for the first is running on port 8080 and RAILS_ENV is
to "production" in the FCGI setup, and the other is running on port 8081
with RAILS_ENV set to "development". This is so my clients can play
with the system without messing up the production database which is due
be put into use shortly.

I can confirm that both instances are using the correct Rails
environment by
going to a non-existant page - the server on port 8080 brings up the
404 error page, whilst the server on port 8081 brings up a Rails routing
error, consistent with production/development behaviour.

However, for some reason, they are both using the production database!
database.yml is configured properly, with both environments set to use
databasename_<ENVIRONMENTNAME>. Both databases exist.

Any ideas? Help is much appreciated.

contact (Guest)
on 2005-11-22 22:07
(Received via mailing list)
Ah, as is usually the way with these things, I found out what was going
wrong just after sending this.

I'd forgotten to change the socket path in the FCGI setup as well. Doh!

This topic is locked and can not be replied to.