Today is "Rails Hates Me Day"


#1

Has anybody had Rails just refuse to cooperate with anything?
I had an application working great in development mode, then switched it
over to production, tried to host it, but couldn’t. Some error that I
can’t figure out. So I decided to create a simpler application, host
THAT in little baby steps until something went wrong so I could tell
maybe where I was losing it.

Unfortunately, now Rails refuses to run scaffolds. So my fresh,
bare-bones app won’t work, and I keep getting “Undefined constant”
errors when I try to run a scaffold on my newly created models. What?

So I decide to go back to my original application, switch it back to
development mode, which is the only mode that works for me right now,
and use that for a bit - it’s a flashcard program i made to teach myself
japanese. Rails says, “Ha ha ha! Not so fast!”, and won’t let me access
the database. Suddenly my passwords are no good and the application,
which ran fine for like a month, doesn’t work at all.

Does anybody know what the likely causes of “Undefined constant” and
“Access denied, Using password: YES” errors mighgt be? Or does Rails
just hate me today?


#2

This is no practical use whatsoever, but when I have days like that, I
figure it’s best to go home early and start fresh the next day. Fly a
kite; kick a football around; have a beer; …

Experience tells me I’ll probably eventually wind up doing something
stupid to try to fix what’s going on, whereas if I can put the problem
off till tomorrow the real cause will probably fall into my conscious
mind before then.

If I stick around and do something stupid, I’ll probably spend a lot
of time getting myself out of an even deeper hole.

Regards

Dave M.


#3

On May 16, 2006, at 10:44 PM, sean colquhoun wrote:

Has anybody had Rails just refuse to cooperate with anything?

Nope. I’ve had days with it where it “taught” me a lot.

Does anybody know what the likely causes of “Undefined constant” and
“Access denied, Using password: YES” errors mighgt be? Or does Rails
just hate me today?

Sounds like your DB hates you today, or your system hates you today.

What changed?


– Tom M.


#4

YES!! Thank you, Tom!

For some reason, when I created the new database, and granted
permissions, because the username was the same, the password at the old
db was also changed to the password i am using on the new db! You’re
right: Today Rails taught me that mysql users are unique even across
different databases.

A beer sounds good too.


#5

On 17/05/2006, at 3:44 PM, sean colquhoun wrote:

Has anybody had Rails just refuse to cooperate with anything?
I had an application working great in development mode, then
switched it
over to production, tried to host it, but couldn’t. Some error that I
can’t figure out. So I decided to create a simpler application, host
THAT in little baby steps until something went wrong so I could tell
maybe where I was losing it.

Maybe it’s whitespace in the database yml file. I haven’t a clue
what I’m talking about, but isn’t yaml whitespace sensitive? That
could be why your having database problems in one particular
environment and not another.

Dan