Forum: Rails Engines datetime_toolbocks and Engines error

Posted by Jo Se (joxor)
on 2008-03-11 19:30
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 method `current' 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:in
`silence_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:in `load'
        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:in
`load_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:in
`load_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:in `require'
        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. :)

Thanks!

/JS
Posted by Jo Se (joxor)
on 2008-03-11 19:34
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? :)

/JS
Posted by Jo Se (joxor)
on 2008-03-12 11:18
Jo Se wrote:
> What am I doing wrong? :)

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 ;) )

Sorry for wasting your time.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.