[Backgroundrb-devel] Mac, ActiveScaffold and BackgroundRB

Jeremy Chatfield jeremyc at merjis.com
Sun Nov 16 18:54:21 EST 2008


Following a suggestion by Samer Masry, I checked the Ruby versions. The
Linux system that worked was running Ruby 1.8.5. After updating to 1.8.7, it
fails in the same way as the macs (on 1.8.6 and 1.8.7).
I'm now tolerably convinced that the Ruby version is affecting the
failure... But now I don't know whether to try asking on Ruby lists,
BackgroundRB list, or ActveScaffold list!

Cheers, JeremyC.

On Sun, Nov 16, 2008 at 6:51 PM, Jeremy Chatfield <jeremyc at merjis.com>wrote:

> Hi - backgroundrb is extremely useful, except in one case, Mac OS X with
> ActiveScaffold. Even when I compile a test environment from Ruby source, I
> still get an error on the Mac, but not on Linux.
> I don't know whether this is a backgroundrb problem, or an ActiveScaffold
> problem, or indeed a Mac problem... I'm sufficiently new to RoR that I don't
> know where to start debugging and disentangling the ownerships of the
> problem :)
>
> Here's the test case:
>
> rails awcore
> cd awcore
> script/generate model Something foo:string bar:integer
> git clone git://github.com/gnufied/backgroundrb.gitvendor/plugins/backgroundrb
> rake backgroundrb:setup
> script/generate worker listsorter
> (edit listsorter to include a new methid "refresh" that runs logger.infoto register the invocation)
> (edit config/background.yml to include a periodic task)
> script/backgroundrb start
>
> This works just fine. Brilliantly so. One more step and it falls apart.
>
> script/backgroundrb stop
> git clone git://github.com/activescaffold/active_scaffold.gitvendor/plugins/active_scaffold && rm -rf vendor/plugins/active_scaffold/.git
> script/backgroundrb start
>
> This will fail with either the Mac OS X Leaopard (10.5.5) Xcode 3.1
> included Ruby 1.8.6 or a fresh compilation of Ruby 1.8.7 (with the various
> gems). I continues working on Debian (the only other test environment I
> tried - I reckon that if it works there and fails on Mac, the Mac is
> implicated somehow).
>
> My gem list is:
>
> actionmailer (2.1.2)
> actionpack (2.1.2)
> activerecord (2.1.2)
> activeresource (2.1.2)
> activesupport (2.1.2)
> capistrano (2.5.2)
> cgi_multipart_eof_fix (2.5.0)
> chronic (0.2.3)
> daemons (1.0.10)
> fastthread (1.0.1)
> gem_plugin (0.2.3)
> highline (1.5.0)
> hoe (1.8.2)
> httpclient (2.1.2)
> mongrel (1.1.5)
> net-scp (1.0.1)
> net-sftp (2.0.1)
> net-ssh (2.0.4)
> net-ssh-gateway (1.0.0)
> packet (0.1.14)
> rails (2.1.2)
> rake (0.8.3)
> RedCloth (4.1.0)
> rubyforge (1.0.1)
> soap4r (1.5.8)
> sqlite3-ruby (1.2.4)
>
> The error report is:
>
>  awcore]$ script/backgroundrb start
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/module/aliasing.rb:31:in
> `alias_method': undefined method `datetime_selector' for class
> `ActionView::Helpers::InstanceTag' (NameError)
>  from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/module/aliasing.rb:31:in
> `alias_method_chain'
> from
> /Users/jeremyc/merjis/tools/tawse/awcore/vendor/plugins/active_scaffold/lib/extensions/name_option_for_datetime.rb:20
>  from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
> from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `require'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in
> `require'
> from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in
> `new_constants_in'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in
> `require'
> from
> /Users/jeremyc/merjis/tools/tawse/awcore/vendor/plugins/active_scaffold/environment.rb:63
>  from
> /Users/jeremyc/merjis/tools/tawse/awcore/vendor/plugins/active_scaffold/environment.rb:63:in
> `each'
> from
> /Users/jeremyc/merjis/tools/tawse/awcore/vendor/plugins/active_scaffold/environment.rb:63
>  from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
> from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `require'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in
> `require'
> from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in
> `new_constants_in'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in
> `require'
> from
> /Users/jeremyc/merjis/tools/tawse/awcore/vendor/plugins/active_scaffold/init.rb:6:in
> `evaluate_init_rb'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin.rb:95:in
> `evaluate_init_rb'
> from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/core_ext/kernel/reporting.rb:11:in
> `silence_warnings'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin.rb:91:in
> `evaluate_init_rb'
> from
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin.rb:44:in
> `load'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin/loader.rb:33:in
> `load_plugins'
> from
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin/loader.rb:32:in
> `each'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/rails/plugin/loader.rb:32:in
> `load_plugins'
> from
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:292:in
> `load_plugins'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:142:in
> `process'
> from /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:97:in
> `send'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/rails-2.1.2/lib/initializer.rb:97:in `run'
> from /Users/jeremyc/merjis/tools/tawse/awcore/config/environment.rb:13
>  from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require'
> from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `require'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in
> `require'
> from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:355:in
> `new_constants_in'
>  from
> /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.2/lib/active_support/dependencies.rb:510:in
> `require'
> from script/backgroundrb:25
>
> The worker is:
>
> class ListsorterWorker < BackgrounDRb::MetaWorker
>   set_worker_name :listsorter_worker
> #  reload_on_schedule true
> #  pool_size 1
>
>   def create(args=nil)
>     # this method is called, when worker is loaded for the first time
>     logger.info 'listsorter initiated'
>   end
>
>   def refresh
>     logger.info 'listsorterer refresh'
>   end
> end
>
> The backgroundrb.yml is:
>
> ---
> :backgroundrb:
>   :port: 11006
>   :ip: 0.0.0.0
>
> :schedules:
>   :listsorter_worker:
>     :refresh:
>       :trigger_args:
>         :start: <%= Time.now + 5.seconds %>
>         :repeat_interval: <%= 15.minutes %>
>         :end: <%= Time.now + 1.month %>
>
> I'm not sure how to further narrow the problem.
>
> Obviously, removing script/backgroundrb results in the service working
> (with the extra steps needed for an ActiveScaffold to work - but I *haven't*
> done these, for this test - I was looking for a simple test case).
>
> Suggestions for how to kill this problem, or what to look at next, are
> welcome. I'd really like to develop on my Mac and then move it over to the
> production servers. Having to develop and test remotely is do-able, but ugly
> slow.
>
> Cheers, JeremyC.
>
>


-- 
Jeremy Chatfield - Merjis: internet marketing strategy, audits and execution
Skype: jezchatfield, Mobile: +44(0)7780 607613, SkypeIn +44 203 290 9977
Merjis Ltd is registered in England with the number 4727672, VAT number
855472011
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20081116/a2111cc4/attachment.html>


More information about the Backgroundrb-devel mailing list