Engines plugin 1.2 release coming real soon now

Hello all,

This is just a quick heads up that I’m going to be making the 1.2
branch of the engines plugin the official release in the very near
future. If you’re planning on using the engines plugin with Rails 1.2,
I’d really appreciate it if you could test the current branch with
your 1.2 application:

rm -fr vendor/plugins/engines
svn co http://svn.rails-engines.org/engines/branches/rb_1.2
vendor/plugins/engines

Check out the UPGRADING notes for what to be wary for, and post any
bugs back to the Collaboa site, http://dev.rails-engines.org (login:
anon, password: engines).

http://svn.rails-engines.org/engines/branches/rb_1.2/UPGRADING

IMPORTANT NOTE for those not using Rails 1.2

If you’re stuck on Rails 1.1.6 or lower (and I’m sure there are many
who are), don’t try to install this release. It won’t work. It should
actually complain gracefully, but there are no guarantees.

Furthermore, if you’re linking to the
http://svn.rails-engines.org/plugins/engines tag via SVN externals,
you MUST update your link to either freeze at the current revision, or
switch to a specific tag. Alternatively, look at the Piston tool for
locking down your version of the engines plugin to a known-working
revision.

This is unbelievably important - ignore at your PERIL.

I upgraded yesterday, and everything is working save for one action in
one
of my controllers no longer responds (I get a routing error)

The action’s name is “thumbnail” and it was working fine prior to the
upgrade. No idea what the problem is.

Can I just delete init_engine.rb? Do I really need anything in init.rb?

That said, I’m really digging the new content tag stuff (the :plugin =>
‘myengine’ options). Very slick.

  • Tony

Found the problem with that action… I guess “.” is a path separator
now.
Awesome. So Engines 1.2 are working fine for me, at least in
development.

Anyway, am I good just deleting init_engine.rb ?

  • Tony

On 1/23/07, Tony A. [email protected] wrote:

Found the problem with that action… I guess “.” is a path separator now.
Awesome. So Engines 1.2 are working fine for me, at least in development.

Anyway, am I good just deleting init_engine.rb ?

If you need any initialization, put it in an init.rb file. As for
upgrading to engines 1.2, this is typically as simple as renaming
init_engine.rb to init.rb, if it exists.

If you don’t have an init_engine.rb, you don’t need to worry. However,
It’s worth noting that your plugin does need to have either a lib
directory or init.rb (or both) to be recognised as a plugin.

When I just renamed init_engine.rb to init.rb Mongrel/Webrick wouldn’t
even
start:

** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment…
Exiting
/opt/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/commands/servers/mongrel.rb:15:
warning: already initialized constant OPTIONS
/opt/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/commands/servers/mongrel.rb:18:
undefined method options' for []:Array (NoMethodError) from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:ingem_original_require’
from
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:33:in
require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:inrequire’
from
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in
new_constants_in' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:inrequire’
from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.1
/lib/commands/server.rb:39
from
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
from
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in
require' from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:innew_constants_in’
from
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in
`require’
from script/server:3

I haven’t had problems with just deleting it.

  • Tony

On 1/23/07, Tony A. [email protected] wrote:

When I just renamed init_engine.rb to init.rb Mongrel/Webrick wouldn’t even
start:

What did you have in init_engine.rb?

On 1/23/07, Tony A. [email protected] wrote:

I pasted it here:

http://pastie.caboo.se/35176

I moved the require ‘login_system’ directive into clickcaster_engine.rb and
it worked just fine…

Hmm - seems odd, though depending on where “login_system” is, it may
not be in the load path at the point init.rb is loaded.

Also, from your paste, you should be aware of the changes to
Engine.current.version. Storing version information in an about.yml
file is the way to go now (see the engines plugin itself for an
example).

Thanks!

I pasted it here:

http://pastie.caboo.se/35176

I moved the require ‘login_system’ directive into clickcaster_engine.rb
and
it worked just fine…

  • Tony