Hello all.

Preamble: I'm using Rails 2.2.2, and the latest ActiveScaffold from
github as of the time of writing.

My scenario is this:

* I create a new app, and install ActiveScaffold
* I create a model, say "Widget", and the migration to create it
* I create a controller that has "active_scaffold :widgets" in it (and
nothing else)

    -- the simplest possible ActiveScaffold use case, I'd have
thought.

In development mode, I can now rake db:migrate and everything works as
expected.

HOWEVER! In production mode, I cannot migrate; the widgets controller
throws an error on the ActiveScaffold line, saying "Could not find
table 'clients'".

As far as I can tell, it's because in production mode, the controllers
get cached up-front, which causes ActiveScaffold to initialize, which
causes the Widget model to load, which fails because the table doesn't
exist.

---

Does this strike anyone else as odd? Is this a change either in recent
Rails or ActiveScaffold versions? (I haven't yet tested to see). I've
used Rails and ActiveScaffold in previous versions, as I swear this
issue would have bitten me before if it had always been like this -
but perhaps I'm wrong.

Is everyone else used to deploying just a migration to the production
server, migrating it, and only then deploying code that uses
ActiveScaffold to refer to it?

If anyone has any thoughts or light to shed on this, it would be
greatly appreciated.

Many thanks,
Neil.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to