[Rails-core] Re: rake db:create error:Unknown database

2008-07-06 Thread Chad Woolley
On Fri, Jul 4, 2008 at 10:39 PM, zilkey [EMAIL PROTECTED] wrote: I think loading the environment with db:create and db:drop is unnecessary. I've run into scenarios where a plugin does some initialization based on the database and raises exceptions if there is no database (ultrasphinx and

[Rails-core] Re: rake db:create error:Unknown database

2008-07-05 Thread Dave Rothlisberger
Also, it seems, based on the 2 threads I linked in the original post, that this behaviour was introduced in rails 2.1 -- but I haven't confirmed that myself. In my case (replying to Andrew Bloom's question), I was automatically defining helper methods like admin?, student?, etc, based on data in

[Rails-core] Re: rake db:create error:Unknown database

2008-07-04 Thread Andrew Bloom
I'm just curious why you find it to be a problem that it loads the environment? On Jul 2, 8:18 pm, Dave Rothlisberger [EMAIL PROTECTED] wrote: If my code tries to access the database at compile time, e.g. defining methods based on values in a table, the rake db:create task fails:   rake

[Rails-core] Re: rake db:create error:Unknown database

2008-07-04 Thread Ben Munat
Well, I agree that that's kind of silly. When you have a very large app, it can take quite a bit of time to load the environment... And, when we're talking about just creating a db, I don't see why we need the environment. Then again, I never use db:create... I just use mysqladmin. b Andrew

[Rails-core] Re: rake db:create error:Unknown database

2008-07-04 Thread zilkey
I think loading the environment with db:create and db:drop is unnecessary. I've run into scenarios where a plugin does some initialization based on the database and raises exceptions if there is no database (ultrasphinx and acts_as_ferret are two that come to mind). Whenever I set up an app on