Hi, I''ve developed an application last year, deployed it to the web server and it worked great. Last week, there were some changes to the hosting plan (changing username mainly ...) but for some reason I am experiencing problems with an application now (same application that worked before). The application uses rails 1.2.3. The error that the production log has is: ActionView::TemplateError (Expected ../config/../app/models/product.rb to define Product) on line #19 of app/views/home/index.rhtml: 16: <div class="floatleft"> 17: <h2>Featured Products</h2> 18: <ul> 19: <% if Product.valid %> 20: <% Product.featured.each do |f| %> 21: <li><%= link_to f.title, :controller => "catalog", :action => "show", :id => f.id %></li> 22: <% end %> Would you know why suddenly it is giving me grief? and/or how to fix it? TIA, Elle --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 12 Jul 2008, at 09:03, elle wrote:> > ActionView::TemplateError (Expected ../config/../app/models/product.rb > to define Product) on line #19 of app/views/home/index.rhtml:That unhelpful message means "something went wrong loading product.rb". If you ruby script/console and just type Product You should get a better error message. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ok, so on my local machine the site loads fine -- no error messages. Same application on the web server (which worked fine beforehand) -- does not. I do have SSH access but I am not sure how to get the console on the web server. I will contact the web host as well. Any other suggestions as to what to look for? Thanks, Elle On Jul 12, 8:34 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 12 Jul 2008, at 09:03, elle wrote: > > > > > ActionView::TemplateError (Expected ../config/../app/models/product.rb > > to define Product) on line #19 of app/views/home/index.rhtml: > > That unhelpful message means "something went wrong loading product.rb". > If you ruby script/console and just type > Product > > You should get a better error message.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Elle, After sshing into your server, you can access the console by doing the following: $ /path/to/your/app/script/console production Note that you may need to change permissions on console to execute it. $ sudo chmod a+x /path/to/your/app/script/console If you don''t find a more helpful error message, would you paste your product.rb file here? On Jul 13, 12:24 am, elle <wazne...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ok, so on my local machine the site loads fine -- no error messages. > Same application on the web server (which worked fine beforehand) -- > does not. > I do have SSH access but I am not sure how to get the console on the > web server. > > I will contact the web host as well. Any other suggestions as to what > to look for? > Thanks, > Elle > > On Jul 12, 8:34 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > On 12 Jul 2008, at 09:03, elle wrote: > > > > ActionView::TemplateError (Expected ../config/../app/models/product.rb > > > to define Product) on line #19 of app/views/home/index.rhtml: > > > That unhelpful message means "something went wrong loading product.rb". > > If you ruby script/console and just type > > Product > > > You should get a better error message.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---