[ANN] RailsRestarter v 0.0.1 version "slow monkey"

Don’t know if something like this exists already, but thought I’d
advertise my script :slight_smile:

Introduction

Rails is slow. Rails in development mode on old computers is WAY slow.
There is hope, however. Just run it in production mode [fast!] and have
it restart whenever a file change occurs. Slow to restart, perhaps, but
far faster than reloading all files per request, which is development
mode. This allowed me to develop in rails on my 1 GHz PPC [like 6 years
old] and still consider it survivable.

How to get/run:

code:
http://code.google.com/p/ruby-roger-useful-functions/source/checkout
buried in here is rails/rails_useful.rb, which contains a function

def fire_up_file_modification_checker_thread reload_dirs =
[‘app/controllers’, ‘app/schools’, ‘app/models’], death_dirs =
[‘app/helpers’, ‘config’,
‘app/controllers/shared_search_code_module.rb’]

so put that file in your lib dir, include it in your environment.rb,
and, if it’s like mine, add something like this to environment.rb

require ‘lib/rails_useful.rb’
require ‘socket’
fire_up_file_modification_checker_thread() if Socket.gethostname =~
/Roger/ # if you’re on a dev machine
and watch the goodness go. And then stop. And restart.

http://code.google.com/p/ruby-roger-useful-functions/wiki/RailsRestarter

-R

On 16 May 2008, at 00:50, Roger P. wrote:

Don’t know if something like this exists already, but thought I’d
advertise my script :slight_smile:

Have you seen
http://svn.techno-weenie.net/projects/plugins/dev_mode_performance_fixes/README
?
Not used it myself, but it seems to try and address the same sort of
problem that you are.

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs