Newbie questions

I am trying to work through the Wrox Beginning Ruby on Rails and have a
few specific questions about the examples in the book.

My questions for this forum are:
Is that a good book to start with?

and

Where is the best place to post newbie questions?

In case this is a good place to ask:

I am running Mandriva/Mandrake 10.2. My input forms are sending extra
characters in the GET query to the controller app, and I don’t know if
that is my Linux install or some other problem. THe extra characters
work like this:

Input.html is supposed to send a request to

This ends up in the GET as “/%5Clook/%5Cat”

I have scoured the example text, and entered different examples with the
same results. Any help appreciated.

I have not used the Wrox book, but certainly Why’s guide is the
accepted introduction to ruby, and the Agile Dev with Rails book is the
best way to be learning up-to-date stuff with 1.2.

As for this problem, %5 is a url-encoded backslash. Seems like a string
escaping problem… I would be curious to back-trace where it comes
from. Is the backslash in the form tag on the original page? Is it in
the url visible in the browser? Or does it just show up in the params
array? I suspect it’s in the original page, in which case it would help
if you could post the code generating the form.

Hope that helped,

Adam

Hi Adam, thanks for the reply

I am not sure how to trace this, but the form tag in the original
input.html is exactly as shown in the original post: . I tried it with back slash and forward slash too, and
both generated the same GET query including the extra “%5C” characters,
which shows up on the console as the output of the webrick processes.
If I manually entered the query string the template responded properly.
How do you look inside this action?

I suppose I could skip ahead and use shortcuts or change it to POST but
I thought I better get this basic stuff down first.

Adam wrote:

I have not used the Wrox book, but certainly Why’s guide is the
accepted introduction to ruby, and the Agile Dev with Rails book is the
best way to be learning up-to-date stuff with 1.2.

As for this problem, %5 is a url-encoded backslash. Seems like a string
escaping problem… I would be curious to back-trace where it comes
from. Is the backslash in the form tag on the original page? Is it in
the url visible in the browser? Or does it just show up in the params
array? I suspect it’s in the original page, in which case it would help
if you could post the code generating the form.

Hope that helped,

Adam

Adam wrote:

When you say it is in the input.html, do you mean the view template on
the server, or the page that is actually sent to the browser? We can
help you best if you post the following: the exact code in this
controller action, the exact code in the view for this action, and the
exact html which gets generated by the server.

On Jan 22, 10:44 pm, Jeff B. [email protected]

Thanks Adam.

I am trying to upgrade to Ruby 1.8.6 now to eliminate that as a problem.
I have downloaded the code from Wrox to create a parallel dev folder and
see what happens with that. If either of these approaches don’t help, I
will be back here with verbose listings, etc.

When you say it is in the input.html, do you mean the view template on
the server, or the page that is actually sent to the browser? We can
help you best if you post the following: the exact code in this
controller action, the exact code in the view for this action, and the
exact html which gets generated by the server.

On Jan 22, 10:44 pm, Jeff B. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs