rake db:create fails and every other rake task

What version of Rails is your app using, and is Rails frozen to your app or is it using gems?

Are you running rake from the "root" of your application directory tree?

What OS are you on?

Jeff softiesonrails.com

Jeff Cohen wrote:

Okay, I'm trying really hard to get this to work. And it has worked before. I have added tables to my database before but now it suddenly doesn't "know how to build task 'db:create', 'db:drop' or even 'db:reset'.

What version of Rails is your app using,

Well, I ran it on "1.8.6-26 Final Release", and everything worked until today when I tried to add a new table with the migrate etc. Since it didn't work I assumed maybe there was some sort of new version out of gems or even rails, so I followed the instructions for updating my gems and rails (Ruby on Rails — Trouble installing new gems? (Part II))

and is Rails frozen to your app or is it using gems?

frozen? I don't think it is. Hard to say right at the moment since I'm writing from home, but I'll get back about that in 8 hours. I'm using gems as far as I know, didn't know it was possible NOT to use gems...

Are you running rake from the "root" of your application directory tree?

I've tried to run it from the "root" of my application, from the "db" directory and migrate directory. All of which rendered the same error.

What OS are you on?

I'm running it on Windows XP

Jeff softiesonrails.com

Thanks allot for the input, hope this makes it clearer about my problem. //Dag Stensson

frozen? I don't think it is. Hard to say right at the moment since I'm writing from home, but I'll get back about that in 8 hours. I'm using gems as far as I know, didn't know it was possible NOT to use gems...

Ah... well, when you upgrade rails, you're also upgrading your application to use the new version, which in some cases will cause issues if you have an app written for Rails 1.x but you've now suddenly upgraded to 2.0.

We've written an introductory article on what freezing is all about here:

> Are you running rake from the "root" of your application directory > tree?

I've tried to run it from the "root" of my application, from the "db" directory and migrate directory. All of which rendered the same error.

Rake should always be run from the root, so it sounds like you have something else wrong with the app.

Try this: what happens when you try:

ruby script\console

(again from the root of your application)

Do you get the Rails console started up? It should say "Loading development environment" or something similar, then give you an irb- style prompt (type "exit" to return to Windows).

I'm running it on Windows XP

Thanks allot for the input, hope this makes it clearer about my problem.

No problem! :slight_smile:

Sorry I forgot to include the link:

http://softiesonrails.com/2008/1/3/freezing-your-rails-application

Jeff

Some further background to what I'm doing with my application. I've based it on RESTful authentication plugin, and built in file_column plugin, and nothing else really. The error appeared the first time ever after installing rMagick and the attachmen_fu plugin.

Ah... well, when you upgrade rails, you're also upgrading your application to use the new version, which in some cases will cause issues if you have an app written for Rails 1.x but you've now suddenly upgraded to 2.0.

Well, I'm sure I did NOT freeze my app(efter reading the article) ;D

Rake should always be run from the root, so it sounds like you have something else wrong with the app.

I can only think of one change I've done to the gems and rails before I decided to update it and that was installing rMagick and its gems...could installing the rMagick gem screw up the other gems in some odd way?

Try this: what happens when you try:

ruby script\console

The console starts up and says something like "Loading development environment"