O'Reilly Forums: Can't Get See Guestbook App In Browser For Chapter 2 - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Can't Get See Guestbook App In Browser For Chapter 2 Instant Rails 2.0

#1 User is offline   Bo_Lasater 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 13-January 09

Posted 13 January 2009 - 06:58 PM

Hi,

I love the book so far but am stuck on Ch.2. I am slavishly following the samples in the book and I have built the "Hello" app and the beginning of the "guestbook" app.

When I try to browse guestbook as suggested on p. 43, I get a routing error. My server is still configured to think the application root is "Hello".

I'm using Instant Rails 2.0 which runs Apache and Mongrel. Anyone know what is wrong, or at least, how to change the application root of a Mongrel server?

Many thanks!
Bo
0

#2 User is offline   simonstl 

  • Active Member
  • PipPip
  • Group: O'Reilly Editor
  • Posts: 35
  • Joined: 17-September 08

Posted 14 January 2009 - 07:06 AM

QUOTE (Bo_Lasater @ Jan 14 2009, 02:58 AM) <{POST_SNAPBACK}>
Hi,

I love the book so far but am stuck on Ch.2. I am slavishly following the samples in the book and I have built the "Hello" app and the beginning of the "guestbook" app.

When I try to browse guestbook as suggested on p. 43, I get a routing error. My server is still configured to think the application root is "Hello".


I'll try to re-create this error today. While I'm working on that, could you give me more detail about what the error looked like? (Just the first few lines should be fine.)

If you started a new application (Create New Rails App... from clicking on the I and Manage Rails Applications...) , it shouldn't know anything about Hello, so I'm a bit confused.

Rails doesn't exactly have a notion of "application root," so I don't think that's the problem exactly. Let me know.

Thanks!

Simon St.Laurent

0

#3 User is offline   Bo_Lasater 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 13-January 09

Posted 14 January 2009 - 02:38 PM

Thanks Simon, but I was able to figure it out. The trick is that you have to shut down the Mongrel server in the restart it again from the new app's directory.

i.e., in the Ruby Console

cd guestbook
ruby script\server

This is mentioned in several places later in the book, but not in the first two chapters where people are most likely to need it. I worked with several folks in my office on this and they were equally befuddled. We only figured it out when a veteran Rails user showed up and gave us some guidance.

On another note, (not worth a full topic), I think chapter 2 sometimes refers to a "People" table when it should refer to the "Entries" table. There is also a disconnect with variable names between Ex. 4-5 (@entry) and the surrounding text (@myEntry).

Simon, I'm glad to know you are monitoring these forums! You and Edd wrote a good book and my appreciation for it has since increased.

Best,
Bo



0

#4 User is offline   simonstl 

  • Active Member
  • PipPip
  • Group: O'Reilly Editor
  • Posts: 35
  • Joined: 17-September 08

Posted 14 January 2009 - 06:09 PM

QUOTE (Bo_Lasater @ Jan 14 2009, 10:38 PM) <{POST_SNAPBACK}>
Thanks Simon, but I was able to figure it out. The trick is that you have to shut down the Mongrel server in the restart it again from the new app's directory.


Indeed. I should have thought of that when you said that hello still seemed to be operating. I was guessing that maybe you'd just built the guestbook inside of hello or on top of it, and went so far as recording the world's dullest screencast to show the example with a clean start. I hadn't started an earlier application, though.

QUOTE
This is mentioned in several places later in the book, but not in the first two chapters where people are most likely to need it. I worked with several folks in my office on this and they were equally befuddled. We only figured it out when a veteran Rails user showed up and gave us some guidance.


I'll have to make sure it gets into future printings as errata.

QUOTE
On another note, (not worth a full topic), I think chapter 2 sometimes refers to a "People" table when it should refer to the "Entries" table. There is also a disconnect with variable names between Ex. 4-5 (@entry) and the surrounding text (@myEntry).


Sorry - that's more errata. It's the result of changing examples late in the project.

QUOTE
Simon, I'm glad to know you are monitoring these forums! You and Edd wrote a good book and my appreciation for it has since increased.


Great! Let us know if anything more comes up!

Thanks,
Simon St.Laurent

0

#5 User is offline   Frandroid Atreides 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 07-May 09

Posted 07 May 2009 - 10:07 PM

On p. 42, there are a couple of instances of "entry" which should be spelled "entries"

I also had the problem mentioned earlier in this thread.
0

#6 User is offline   RNobleman 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 03-September 09

Posted 03 September 2009 - 01:21 PM

I also ran across this problem just now. I switched to the guestbook directory and it worked. Thanks for this forum!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users