reload environment.rb without restarting server

Ben wrote:

Hey all,

I'm running Rails with a shared hosting provider, and can't restart the
web server - so how do I get Rails to recognize the new paths I've added
to /config/environment.rb?

Thanks,
Ben

I'd like to know this too.

Simon

I am pretty sure you cannot do that… however you don’t have to “restart the server”, you need to restart the dispatchers.

Most shared hosts give you shell access. All you need to do is run the command

killall -USR2 dispatch.fcgi

or if that doesn’t work…

killall -9 dispatch.fcgi

If you’re not allowed to do these things then you need to contact your host and either get them to let you do what you need or cancel your account. Plenty of hosts will allow you to manage your own processes. (Rails Playground, Dreamhost, Bluehost, etc)