Passenger caching in development mode, wtf?

Hi all,
I updated an application to Rails 2.3.2(and ruby 1.9.1) and installed
Passenger, after learning that it turns production mode on by default, i
changed that to development mode. Logs are correctly being saved to
development.log so i should definately be in development mode, right?

Well NO! Any change to my code has to be followed by a restart of the
application due to some caching that I dont want.

Now that they are removing CGI support too, just how the hell am I
supposed to be making a website in development mode without having to
restart 500 times a day???

Thanks
Petr

I just tested with Ruby 1.8 and its the same behaviour.

An clues people?

perhaps here:

http://www.modrails.com/documentation/Users%20guide.html#RailsSpawnMethod

but can’t you use mongrel for development and passenger for production?

Petr J. wrote:

I just tested with Ruby 1.8 and its the same behaviour.

An clues people?

On Apr 15, 5:58 am, Petr J. [email protected]
wrote:

This makes no difference. The problem is with mongrel is that I need the
devel applications to be accessible even when im not developing, ie.
client review. And id need to make a start up script in case i reboot
the server to make all the mongrels start up. Its just hassle.
dispatch.cgi/fcgi was ideal for simple setup in development mode where
speed usually doesnt matter.

Well the passenger docs imply that it should all just work:

“If you set RailsEnv development in your Apache configuration, then
Rails will automatically reload your application code after each
request”

You might want to ask the passenger mailing list or similar why it
doesn’t seem to be working for you.

Fred

This makes no difference. The problem is with mongrel is that I need the
devel applications to be accessible even when im not developing, ie.
client review. And id need to make a start up script in case i reboot
the server to make all the mongrels start up. Its just hassle.
dispatch.cgi/fcgi was ideal for simple setup in development mode where
speed usually doesnt matter.

PP Junty wrote:

perhaps here:

Phusion Passenger users guide index

but can’t you use mongrel for development and passenger for production?

Petr J. wrote:

I just tested with Ruby 1.8 and its the same behaviour.

An clues people?

I’ve not tried this, but as a last resort you might try: touch
tmp/always_restart.txt in your application’s root folder.
Cheers–

Charles

On Wed, Apr 15, 2009 at 3:11 AM, Frederick C. <

Ok i resolved it, after hours of trying to figure it out, i noticed that
the cause is having config.threadsafe! enabled in development mode. For
some reason it causes caching to get enabled. This option should be
documented better.

Petr

On Apr 16, 3:36 am, Petr J. [email protected]
wrote:

Ok i resolved it, after hours of trying to figure it out, i noticed that
the cause is having config.threadsafe! enabled in development mode. For
some reason it causes caching to get enabled. This option should be
documented better.

The reloading mechanism in rails isn’t threadsafe, so threadsafe!
among other things turns it off (mentioned among other places in
Configuring Rails Applications — Ruby on Rails Guides)

Fred