Forum: Ruby on Rails help needed

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Andy D. (Guest)
on 2009-01-14 18:56
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. 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
Dr rebs R. (Guest)
on 2009-01-14 19:23
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. 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
Agustin V. (Guest)
on 2009-01-14 19:33
(Received via mailing list)
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 <
ROGER BIRD (Guest)
on 2009-01-14 20:25
(Received via mailing list)
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> 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. 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/.












_________________________________________________________________
Windows Live™ Hotmail®: Chat. Store. Share. Do more with mail.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t...
Andy D. (Guest)
on 2009-01-14 22:03
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. 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
Andy D. (Guest)
on 2009-01-15 16:43
Guys,

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

thanks
Andy D. (Guest)
on 2009-01-15 20:06
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
This topic is locked and can not be replied to.