Using the “dry_scaffold” and “dhtml_calendar” plugins with Rails 1.2.3

I spent the morning trying to get a lame little site up and running. I didn’t know it would be an issue until I couldn’t turn back. Information was sketchy, so here’s my addition to the sketchy info I had found.

Keep in mind, these instructions are only designed to help if you already had these plugins working with an older version of Rails.

The dry_scaffold plugin doesn’t seem to be supported anymore. The author seems to prefer “active_scaffold”. Nice–unless you don’t want to rewrite all your code that had previously been designed for “dry_scaffold”. Also, the older version of “Engines” I had doesn’t work with Rails 1.2.3. So, here’s the skinny:

1. upgrade Engines:

ruby script/plugin install --force

(if that fails, export the svn and copy it to your vendor/plugins directory)

2. read the “UPGRADING” file included in the Engines plugin. A lot has changed. To get the two plugins I needed, I had to modify several files.


just before the section with your configuration for dry_scaffold, add this:

require File.join(RAILS_ROOT, "vendor", "plugins", "engines",
                    "lib", "engines", "deprecated_config_support")

also, you’ll want to get rid of your “Engines.start” statement(s).

Do the following for both plugins…Copy the init_engine.rb file to init.rb within the individual plugin’s folder.

Then, edit init.rb:

Comment out the line about “Engines.current.version = …” I’m not sure why, but that breaks stuff and everything works fine without it.

Finally, in your layouts in app/views/layouts, you’ll need to edit the stylesheet and javascript include tags. Here’s the new format:

<%= stylesheet_link_tag "dry_scaffold", :plugin=>"dry_scaffold" %>
<%= javascript_include_tag "dry_scaffold", "rico_corner", :plugin=>"dry_scaffold" %>

<%= stylesheet_link_tag "dhtml_calendar","calendar-blue", :plugin=>"dhtml_calendar" %>
<%= stylesheet_include_tag "dhtml_calendar","datebocks_engine","calendar","lang/calendar-en","calendar-setup", :plugin=>"dhtml_calendar" %>

I think that will do it. Hopefully this will help someone…and not be more confusing than the info out there now.