When I started Rails Development, I needed to use ''killall -g dispatch.fcgi'' whenever I made a change to a Model to see the change on my website. Now it seems I need to do this to see any change to the Controller as well. Any ideas of what I am doing wrong??? -- Posted via http://www.ruby-forum.com/.
On Wed Jun 28, 2006 at 11:07:30PM +0200, battreal wrote:> When I started Rails Development, I needed to use ''killall -g > dispatch.fcgi'' whenever I made a change to a Model to see the change on > my website. Now it seems I need to do this to see any change to the > Controller as well. > Any ideas of what I am doing wrong???are you running in production mode while doing development? thats what it sounds like if you use eg, initng, and mongrel, you can just paste something like this into /etc/initng/daemon/mongrel.i daemon daemon/mongrel { need = system/bootmisc; use = system/static-modules system/coldplug; require_network; exec daemon = /usr/bin/ruby18 /usr/bin/mongrel_rails start -c /var/www/app -p 80; } and issue ''ngc -r mongrel''. similar for apache would be ''apachectl restart''. in development mode this is only necessary in a few cases like changing contents of the vendor/ and maybe lib/ or config/ directories..
If you are running Linux and have permission to reboot the webserver, try this instead of "killall". Reboot the webserver with: apachectl graceful Wait a few seconds for the restart, then type: ps aux | grep fcgi For me, the bottom processes are the new ones and the top ones are the old ones that didn''t die. And the 2nd column is the process id (PID). kill -9 PID (where PID is the process id you want to kill off) If you are running in production mode, you will need to do this every time you want to load a change you''ve made to a model, controller, helper, route or environment (basically anything but a view). If you are still developing, it is much better to run in development mode because the whole application will reload each time. Finally, if you are not developing in production mode, then you may be experiencing a bug related to using fcgi with development mode. A Google search will turn up more details. HTH, Kevin Skoglund> When I started Rails Development, I needed to use ''killall -g > dispatch.fcgi'' whenever I made a change to a Model to see the > change on > my website. Now it seems I need to do this to see any change to the > Controller as well. > Any ideas of what I am doing wrong???