Datetime_toolbocks and Engines error

Hi Guys,

Does anyone know why this happens and perhaps what to do to fix it?

======
user@box: $ ./script/runner ‘puts Rails::VERSION::STRING’
/vendor/plugins/datetime_toolbocks/init.rb:25:in evaluate_init_rb': undefined methodcurrent’ for Engines:Module (NoMethodError)
from
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:79:in
evaluate_init_rb' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/kernel/reporting.rb:11:insilence_warnings’
from
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:75:in
evaluate_init_rb' from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb:39:inload’
from
/var/www-virtual/spine/releases/20080307144118/config/…/vendor/plugins/engines/lib/engines/plugin.rb:77:in
load' from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/loader.rb:33:inload_plugins’
from
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/loader.rb:32:in
each' from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/loader.rb:32:inload_plugins’
… 7 levels…
from
/usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/runner.rb:39
from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from ./script/runner:3

========

It also happens when I start the server.
I’ve been trying to get the app to run under Rails 2.0.2 and I’ve had
all sorts of issues with the plugins and engines, this one is the most
recent issue I’m experiencing.

Grateful for any input; I’m getting desperate. :slight_smile:

Thanks!

/JS

Oh, I forgot to mention where the error comes from:

It’s coming from line vendor/plugins/datetime_toolbocks/init.rb line 24

Engines.current.version = Proc.new { File.open(File.join(RAILS_ROOT,
‘vendor’, ‘plugins’, ‘datetime_toolbocks’, ‘VERSION’), ‘r’).readlines[0]
}

What am I doing wrong? :slight_smile:

/JS

Jo Se wrote:

What am I doing wrong? :slight_smile:

Answer; Not reading Nathaniel’s instructions properly… bhelergh!

http://nshb.net/engines-2-0-and-rails-2-0-upgrade-gotchas

Thanks for the gotchas Nathaniel (albeit not clear enough for my daft
grey matter :wink: )

Sorry for wasting your time.