Forum: Ruby on Rails RoR production app does not refresh

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3320715fa6264e6309503d5bd089fad2?d=identicon&s=25 Mufaddal Khumri (mkhumri)
on 2006-01-31 22:48
(Received via mailing list)
Hi,

We have a RoR app deployed using Apache + fastcgi in production mode.
When we make a change to say a controller filie on the server and go
back to that page that executes that controller action it takes no
effect. Does Rails cache pages and if so how does one force the new page
to be used?

Thanks,
F15fdc7cb2e911b3808837f2be244add?d=identicon&s=25 Adam Denenberg (Guest)
on 2006-01-31 22:57
(Received via mailing list)
rails caches controllers in production.  set INITIAL_ENV=development
or change the setting in environment.rb that caches controllers

adam
F15fdc7cb2e911b3808837f2be244add?d=identicon&s=25 Adam Denenberg (Guest)
on 2006-01-31 22:57
(Received via mailing list)
sorry i dont think i answered your question.  You can reload the
fastcgi process by running

script/process/reaper -a reload

This will reload all the controller caches.

adam
E98de78bb42013c488fe8aa9d77d2cb1?d=identicon&s=25 Steve Odom (Guest)
on 2006-01-31 23:00
(Received via mailing list)
Hi Mufaddal,

In production mode, you must restart the server in order for changes to
go
into effect.

Steve
http://www.smarkets.net
7c4087d053eb02d099a17d91ba5e33b5?d=identicon&s=25 Brian V. Hughes (Guest)
on 2006-01-31 23:39
(Received via mailing list)
Steve Odom wrote:
> In production mode, you must restart the server in order for changes to
> go into effect.

Not exactly... in production mode you must reload the application code,
which is
done using ./script/process/reaper from the root level of your Rails
application.

Restarting Apache would accomplish a similar effect, but that would
likely
orphan whatever FastCGI listeners you had been using. It's far better to
just
restart those processes and leave restarting the web server for when you
change
the web server configuration.

Also, if you use SVN for your source control, you could install and
configure
Switchtower and use it to both deploy the latest version of your app
code to the
production server and automatically bounce the FastCGI listeners...

-Brian
This topic is locked and can not be replied to.