=?utf-8?q?Newbie_rails_woes_-_the_=27Recognition_failed_?= =


#1

I’m working with the agile rails book (latest rev), and have encountered
more
show stoppers than I woud have expected. The lastest one is rather
worrying.

Page 57 is somewhat notorious for breaking. There are all sorts of blogs
etc
about breakage and fixes since roughly Nov 05.

Rails 0.14.1 and the Broken Depot

Steel rails through my skull

Even back then, the breakage was known and supposed to have been fixed
in
later versions of rails. But here I am in Feb 06, cracking up on the
same
issue. I updated via gems before building this depot app (gem install
rails
–include-dependencies) so I’m puzzled that the issue persists. I’ve not
tried the manual fixes, I’m sure that they work.

But I don’t understand a couple of aspects of this. If this issue was
supposed to have been fixed months ago, then why do I still see it? And,
why
does this particular error seem to strike at the book’s sample app in
particular? I’m hoping that generating a scaffold does not normally bust
things up like this. If it did, most of the posts wouldn’t be around the
book sample code.

Possibly related is that while I’ve run gem install rails
–include-dependencies I still have ruby 1.8.2 (why?). rails is 1.0.0.
That’s not the most recent ruby but this would seem to be a rails issue
not
a ruby one?

View this message in context:
http://www.nabble.com/Newbie-rails-woes---the-'Recognition-failed-for-admin'-thing-t1189946.html#a3135662
Sent from the RubyOnRails Users forum at Nabble.com.


#2

On Sun, 2006-02-26 at 11:30 -0800, Michael B. wrote:

Even back then, the breakage was known and supposed to have been fixed in
book sample code.

Possibly related is that while I’ve run gem install rails
–include-dependencies I still have ruby 1.8.2 (why?). rails is 1.0.0.
That’s not the most recent ruby but this would seem to be a rails issue not
a ruby one?


ruby packaging is part of your Linux distribution I am gathering - 1.8.2
should be fine and I doubt that is your problem.

Your problem is not specifically mentioned so there is no way anyone
could possibly help but I hope it was cathartic to mention all of this.

Craig


#3

On Sun, 2006-02-26 at 12:42 -0800, Michael B. wrote:

"When you execute the ruby script/generate scaffold Product Admin command as

The first list provides a fix. I wasn’t so much asking about the fix, since
it seems to be well documented. I was asking “why is the error persisting
after 3-4 months after supposedly being fixed” and “why/does this error only
crop up with this tutorial app”? Question one is just a puzzlement. No big
deal really. But the second part, why is this particular simple command
failing? Why don’t all generate scaffold commands fail?

I’m using windows. Yesterday was the first time I ran “gem install rails
–include-dependencies” and it did updates some things, pretty cool. I guess
it does not get the latest ruby?


The book tries to cover a lot of OS scenarios and anticipated behavior
in a version that was released long after it went into print.

The truth is, most people don’t use the scaffold feature after they get
used to rails…they just do it themselves but it is a great feature and
with some rarely used models, it’s worth doing the scaffold to get the
basic CRUD stuff and then not bother with it just in case you actually
need to go in a list/edit the records. I find that passing 2 names to a
scaffold command to be ambiguous and thus, only pass a single controller
name at the end of the command.

personally, I’m not gonna spend any time considering why
ruby script/generate scaffold Product Admin
doesn’t generate correct routing for /admin - perhaps you should contact
the author.

As for gems…it doesn’t update ruby - ruby is packaged by itself.

Craig


#4

Ok, thanks for that input. I solved it - I have mySQL 5 installed. When
I
first tried using it with rails it errored out, and I resovled with the
OLD_PASSWORD fix. Later I updated rails via gem and I’m guessing that
the
updated switched rails’ gears and now it -expects- the later pswd
format.
After reading around more I got a hint of this, redid the passwords, and
it’s solved. At least I think that’s what happened, it’s not utterly
clear.

View this message in context:
http://www.nabble.com/Newbie-rails-woes---the-'Recognition-failed-for-admin'-thing-t1189946.html#a3138181
Sent from the RubyOnRails Users forum at Nabble.com.


#5

Cathartic? I hope you didn’t take that as a rant. As someone new to
rails I’m
just surprised that there are as many off-the-track experiences to be
had in
the first 57 pages of a beginners book. The current issue is not a book
syntax error. These are the baby steps. I have to wonder what it’s going
to
be like when things get more complicated.

The message title has the error message; the two links are all about the
error. Here is part of the first links writeup about it (a nov 05 blog
entry)

“When you execute the ruby script/generate scaffold Product Admin
command as
described on page 57, the controller files (Admin) incorrectly get named
after the model (Product). The bug report at the Rails development site
notes that a fix has been applied, but Iâ??ve upgraded my Rails
installation
and it still seems to be present.”

The specific error in the browser is

Routing Error

Recognition failed for â??/adminâ?

The first list provides a fix. I wasn’t so much asking about the fix,
since
it seems to be well documented. I was asking “why is the error
persisting
after 3-4 months after supposedly being fixed” and “why/does this error
only
crop up with this tutorial app”? Question one is just a puzzlement. No
big
deal really. But the second part, why is this particular simple command
failing? Why don’t all generate scaffold commands fail?

I’m using windows. Yesterday was the first time I ran “gem install rails
–include-dependencies” and it did updates some things, pretty cool. I
guess
it does not get the latest ruby?

View this message in context:
http://www.nabble.com/Newbie-rails-woes---the-'Recognition-failed-for-admin'-thing-t1189946.html#a3136402
Sent from the RubyOnRails Users forum at Nabble.com.