small medium large xlarge

Generic-user-small
24 Jan 2009, 22:38
pauwl Lunow (2 posts)

Just purchased the PDF. Clear work (but I’m stuck on p49).

Doing the Say Hello part, I get ther error:

Routing Error

No route matches “/say/abc” with {:method=>:get}

in the browser. I’m sure I’m doing everything ‘by the book’.

I’ve searched around, but can’t find an answer - will press on in case it’s a missing view or something else - but any ideas?

thanks,

Pauwl

Generic-user-small
24 Jan 2009, 22:44
pauwl Lunow (2 posts)

Er..

I stopped rails & re-started - which seems to work.

P 50 mentions there is no need to do this however.

P.

Generic-user-small
24 Mar 2010, 00:55
Johnny Hernandez (1 post)

I just ran into this issue while trying to view the catalog display as part of chapter 7. Restarting the sever worked for me also. Maybe this is a Windows install of ROR issue?

Generic-user-small
15 Jun 2010, 18:56
Roberto Fuentes (6 posts)

I have ran into the same issue that pauwl Lunow discussed. I restarted the server many times with no avail.

Any suggestions?

Thanks

Generic-user-small
15 Jun 2010, 19:10
Roberto Fuentes (6 posts)

This is the error:

SyntaxError in SayController#hello

c:/RAILS/work/demo/app/controllers/say_controller.rb:5: syntax error, unexpected kEND, expecting $end

Response

Headers:

{“Content-Type”=>””, “Cache-Control”=>”no-cache”}

Here is the code:

class SayController < ApplicationController def hello @time = Time.now end end

Dave_gnome_head_isolated_pragsmall
15 Jun 2010, 20:57
Dave Thomas (390 posts)

Roberto:

The error is saying that there are too many ‘end’ keywords in your source file.

Because the posting you made has the code formatting all on one line it;s hard to say why this is happening. But it should be fairly easy to track down. Double check the source, and make sure that you’re not being fooled by indentation (Ruby doesn’t care about indentation, but quite often our eyes get fooled by it).

Dave

Generic-user-small
16 Jun 2010, 15:44
Roberto Fuentes (6 posts)

Dave,

I appreciate the feed back. I figured the problem out. It wasn’t so much that the source code was in err but that it was written in UTF-8. I changed that to UTF-8 Plain and it works just fine now. The x.html.erb can be written in UTF-8 but its the controller that must be written in UTF-8 Plain in order for the program to run.

Thanks

You must be logged in to comment