# Help needed

**URL:** <https://www.ruby-forum.com/t/help-needed/157708>\
**Category:** Rails\
**Created:** [January 14, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/help-needed/157708 "2009-01-14T17:56:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aca169/32.png) [@dbest](https://www.ruby-forum.com/u/dbest)\
**Post date:** [January 14, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/help-needed/157708/1 "2009-01-14T17:56:22Z")

</div>

Hi guys,

i am now trying to learn ruby, there was another developer that left and  
i have a problem with our company website, [www.italyabroad.com](http://www.italyabroad.com). when  
clicking on wine on the navigation bar, the page does not open and there  
is an error. when clicking on all other sections of the website (eg  
food) that should use the same code, it works. i cannot understand where  
is the problem, i have gone through plenty of books but my knowledge of  
ruby is not up to it yet, any idea where is the error? thanks for all  
your help.

Andy

---

<div class="post-metadata">

**Author:** ![dbest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aca169/32.png) [@dbest](https://www.ruby-forum.com/u/dbest)\
**Post date:** [January 14, 2009, 6:23pm UTC](https://www.ruby-forum.com/t/help-needed/157708/2 "2009-01-14T18:23:31Z")

</div>

Without logs it is very hard to deduce what has occurred

but the error appears to be happening on the following routes

/categories/show/wine  
/categories/sub-categories/red-wines

but not on

/categories/sub-categories/biscuits  
/categories/show/food

Therefore at a guess there is a problem accessing the Wine model (if  
infact youhave a wine model?).

Query your database copy though script/console to ensure you can access  
the wine model.

if that works then you know the problem is somewhere in the controller  
code handling the wine model. Anyway you really need the server error  
logs that show you the problem and should provide a stack trace so u can  
see where it is failing.

By the way your drop down menus dont work in Safari. (the background is  
clear not white or whatever)

Andy Dercole wrote:

> Hi guys,
> 
> i am now trying to learn ruby, there was another developer that left and  
> i have a problem with our company website, [www.italyabroad.com](http://www.italyabroad.com). when  
> clicking on wine on the navigation bar, the page does not open and there  
> is an error. when clicking on all other sections of the website (eg  
> food) that should use the same code, it works. i cannot understand where  
> is the problem, i have gone through plenty of books but my knowledge of  
> ruby is not up to it yet, any idea where is the error? thanks for all  
> your help.
> 
> Andy

---

<div class="post-metadata">

**Author:** ![dbest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aca169/32.png) [@dbest](https://www.ruby-forum.com/u/dbest)\
**Post date:** [January 14, 2009, 6:33pm UTC](https://www.ruby-forum.com/t/help-needed/157708/3 "2009-01-14T18:33:37Z")

</div>

Do you have any trace of the error o more details in the logs?

In the site only see an error page and redirects to the index.

With more details we can see the source of the error.

On Wed, Jan 14, 2009 at 2:56 PM, Andy Dercole \<

---

<div class="post-metadata">

**Author:** ![dbest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aca169/32.png) [@dbest](https://www.ruby-forum.com/u/dbest)\
**Post date:** [January 14, 2009, 9:03pm UTC](https://www.ruby-forum.com/t/help-needed/157708/4 "2009-01-14T21:03:46Z")

</div>

Hi and thanks for the help ( i will work on safari). With regard to the  
log, i will look at it and find out whether it says something. As i  
said, i am new to ruby so still trying to find my way. I dont think  
there is any wine model, there is only a category model. the last time  
it was working i took a few products off the site from the admin panel,  
and suddendly it stopped working. will try to reput them and see what  
happens. will copy the log in here.

Andy

Dr rebs Rebo wrote:

> Without logs it is very hard to deduce what has occurred
> 
> but the error appears to be happening on the following routes
> 
> /categories/show/wine  
> /categories/sub-categories/red-wines
> 
> but not on
> 
> /categories/sub-categories/biscuits  
> /categories/show/food
> 
> Therefore at a guess there is a problem accessing the Wine model (if  
> infact youhave a wine model?).
> 
> Query your database copy though script/console to ensure you can access  
> the wine model.
> 
> if that works then you know the problem is somewhere in the controller  
> code handling the wine model. Anyway you really need the server error  
> logs that show you the problem and should provide a stack trace so u can  
> see where it is failing.
> 
> By the way your drop down menus dont work in Safari. (the background is  
> clear not white or whatever)
> 
> Andy Dercole wrote:
> 
> > Hi guys,
> > 
> > i am now trying to learn ruby, there was another developer that left and  
> > i have a problem with our company website, [www.italyabroad.com](http://www.italyabroad.com). when  
> > clicking on wine on the navigation bar, the page does not open and there  
> > is an error. when clicking on all other sections of the website (eg  
> > food) that should use the same code, it works. i cannot understand where  
> > is the problem, i have gone through plenty of books but my knowledge of  
> > ruby is not up to it yet, any idea where is the error? thanks for all  
> > your help.
> > 
> > Andy

---

<div class="post-metadata">

**Author:** ![dbest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aca169/32.png) [@dbest](https://www.ruby-forum.com/u/dbest)\
**Post date:** [January 15, 2009, 3:43pm UTC](https://www.ruby-forum.com/t/help-needed/157708/5 "2009-01-15T15:43:13Z")

</div>

Guys,

the log file is huge, how can i open and look at it without the computer  
to stall?

thanks

---

<div class="post-metadata">

**Author:** ![dbest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aca169/32.png) [@dbest](https://www.ruby-forum.com/u/dbest)\
**Post date:** [January 14, 2009, 7:25pm UTC](https://www.ruby-forum.com/t/help-needed/157708/6 "2009-01-14T19:25:25Z")

</div>

Dear Agustin,

I solved that problem: The “^D” in the book meant “control D” not  
“character^D”. But now I have another problem.

% cd sample  
I am very rusty on these old  
command line interfaces, but  
I finally got there.

% ruby eval.rb  
This worked.

ruby\> a = “Hello, world!”  
This worked, thusly:  
“Hello, world!”

But when I tried this:  
ruby\> puts a  
I got this:  
ERR: undefined local variable or method ‘a’ for  
main:Object

Date: Wed, 14 Jan 2009 15:00:56 -0200  
From: removed\_email\_address@domain.invalid  
To: removed\_email\_address@domain.invalid  
Subject: [Rails] Re: help needed

Do you have any trace of the error o more details in the logs?

In the site only see an error page and redirects to the index.

With more details we can see the source of the error.

On Wed, Jan 14, 2009 at 2:56 PM, Andy Dercole  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

Hi guys,

i am now trying to learn ruby, there was another developer that left and

i have a problem with our company website, [www.italyabroad.com](http://www.italyabroad.com). when

clicking on wine on the navigation bar, the page does not open and there

is an error. when clicking on all other sections of the website (eg

food) that should use the same code, it works. i cannot understand where

is the problem, i have gone through plenty of books but my knowledge of

ruby is not up to it yet, any idea where is the error? thanks for all

your help.

Andy

–

Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

* * *

Windows Liveâ„¢ HotmailÂ®: Chat. Store. Share. Do more with mail.  
[http://windowslive.com/explore?ocid=TXT\_TAGLM\_WL\_t1\_hm\_justgotbetter\_explore\_012009](http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_hm_justgotbetter_explore_012009)

---

<div class="post-metadata">

**Author:** ![dbest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aca169/32.png) [@dbest](https://www.ruby-forum.com/u/dbest)\
**Post date:** [January 15, 2009, 7:06pm UTC](https://www.ruby-forum.com/t/help-needed/157708/7 "2009-01-15T19:06:42Z")

</div>

this is the error log:  
ActionView::TemplateError (Expected  
/home/virtual/site12/fst/var/www/italy/app/models/resource.rb to define  
Resource) on line #2 of  
app/views/site/shared/\_box\_wine\_pdf.rhtml:  
(it is running rails 2.2.2)

thanks  
Andy
