kopf1988
2008-Feb-25 20:29 UTC
LoadError (Expected websites_controller.rb to define WebsitesController)
Hi, I just removed all my RoR files on my web server and re uploaded them again because I made so many changes to my application. Now all of a sudden, I''m getting the LoadError (Expected websites_controller.rb to define WebsitesController). But this is the first line of my websites_controller.rb: class WebsitesController < ApplicationController Any ideas why I might be getting such a crazy error? My application worked fine in the past. -Ryan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
kopf1988
2008-Feb-25 20:39 UTC
Re: LoadError (Expected websites_controller.rb to define WebsitesController)
And occasionally I get other impossibly unhelpful errors: uninitialized constant ApplicationController undefined method `getwebsite'' for ApplicationController:Class no route found to match "/javascripts/prototype.js" with {:method=>:get} On Feb 25, 2:29 pm, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I just removed all my RoR files on my web server and re uploaded them > again because I made so many changes to my application. Now all of a > sudden, I''m getting the LoadError (Expected websites_controller.rb to > define WebsitesController). But this is the first line of my > websites_controller.rb: > > class WebsitesController < ApplicationController > > Any ideas why I might be getting such a crazy error? My application > worked fine in the past. > > -Ryan--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
kopf1988
2008-Feb-25 20:49 UTC
Re: LoadError (Expected websites_controller.rb to define WebsitesController)
Actually, the error just gets worse for no reason. Now it won''t find my "getwebsite" function. My application does: include ApplicationHelper and ApplicationHelper has: def getwebpage id = (params[:id].nil? ? "homepage" : params[:id]) @webpage = $website.WebPages.find_by_long_id(id) return @webpage end But I still get undefined local variable or method `getwebsite'' for ApplicationController:Class. On Feb 25, 2:39 pm, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> And occasionally I get other impossibly unhelpful errors: > > uninitialized constant ApplicationController > undefined method `getwebsite'' for ApplicationController:Class > no route found to match "/javascripts/prototype.js" with > {:method=>:get} > > On Feb 25, 2:29 pm, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi, > > > I just removed all my RoR files on my web server and re uploaded them > > again because I made so many changes to my application. Now all of a > > sudden, I''m getting the LoadError (Expected websites_controller.rb to > > define WebsitesController). But this is the first line of my > > websites_controller.rb: > > > class WebsitesController < ApplicationController > > > Any ideas why I might be getting such a crazy error? My application > > worked fine in the past. > > > -Ryan--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Conrad Taylor
2008-Feb-25 20:59 UTC
Re: LoadError (Expected websites_controller.rb to define WebsitesController)
Hi, you''re calling getwebsite somewhere but you have defined method called getwebpage. Thus, are these to names refer to same code or different code? Also, is everything working locally? If not, then your wasting your time deploying. -Conrad On Mon, Feb 25, 2008 at 12:49 PM, kopf1988 <kopf1988-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Actually, the error just gets worse for no reason. Now it won''t find > my "getwebsite" function. > > My application does: > include ApplicationHelper > > and ApplicationHelper has: > def getwebpage > id = (params[:id].nil? ? "homepage" : params[:id]) > @webpage = $website.WebPages.find_by_long_id(id) > return @webpage > end > > But I still get undefined local variable or method `getwebsite'' for > ApplicationController:Class. > > > On Feb 25, 2:39 pm, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > And occasionally I get other impossibly unhelpful errors: > > > > uninitialized constant ApplicationController > > undefined method `getwebsite'' for ApplicationController:Class > > no route found to match "/javascripts/prototype.js" with > > {:method=>:get} > > > > On Feb 25, 2:29 pm, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi, > > > > > I just removed all my RoR files on my web server and re uploaded them > > > again because I made so many changes to my application. Now all of a > > > sudden, I''m getting the LoadError (Expected websites_controller.rb to > > > define WebsitesController). But this is the first line of my > > > websites_controller.rb: > > > > > class WebsitesController < ApplicationController > > > > > Any ideas why I might be getting such a crazy error? My application > > > worked fine in the past. > > > > > -Ryan > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
kopf1988
2008-Feb-25 21:08 UTC
Re: LoadError (Expected websites_controller.rb to define WebsitesController)
Ah, sorry I copied the wrong one. I also have: def getwebsite sitename = request.host_with_port sitename = "www." + sitename unless sitename.split(''.'')[2] $website = Website.find_by_title( sitename ) end defined in my Application Helper. Its not working locally either.... but the thing is I HAVE defined that. Evil machine. On Feb 25, 2:59 pm, "Conrad Taylor" <conra...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, you''re calling getwebsite somewhere but you have defined method called > getwebpage. Thus, are these to names refer to same code or different code? > Also, is everything working locally? If not, then your wasting your time > deploying. > -Conrad > > On Mon, Feb 25, 2008 at 12:49 PM, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Actually, the error just gets worse for no reason. Now it won''t find > > my "getwebsite" function. > > > My application does: > > include ApplicationHelper > > > and ApplicationHelper has: > > def getwebpage > > id = (params[:id].nil? ? "homepage" : params[:id]) > > @webpage = $website.WebPages.find_by_long_id(id) > > return @webpage > > end > > > But I still get undefined local variable or method `getwebsite'' for > > ApplicationController:Class. > > > On Feb 25, 2:39 pm, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > And occasionally I get other impossibly unhelpful errors: > > > > uninitialized constant ApplicationController > > > undefined method `getwebsite'' for ApplicationController:Class > > > no route found to match "/javascripts/prototype.js" with > > > {:method=>:get} > > > > On Feb 25, 2:29 pm, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi, > > > > > I just removed all my RoR files on my web server and re uploaded them > > > > again because I made so many changes to my application. Now all of a > > > > sudden, I''m getting the LoadError (Expected websites_controller.rb to > > > > define WebsitesController). But this is the first line of my > > > > websites_controller.rb: > > > > > class WebsitesController < ApplicationController > > > > > Any ideas why I might be getting such a crazy error? My application > > > > worked fine in the past. > > > > > -Ryan--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
lq
2008-Feb-25 23:18 UTC
Re: LoadError (Expected websites_controller.rb to define WebsitesController)
ensure there are no syntax errors in websites_controller.rb. On 25 фев, 22:29, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I just removed all my RoR files on my web server and re uploaded them > again because I made so many changes to my application. Now all of a > sudden, I''m getting the LoadError (Expected websites_controller.rb to > define WebsitesController). But this is the first line of my > websites_controller.rb: > > class WebsitesController < ApplicationController > > Any ideas why I might be getting such a crazy error? My application > worked fine in the past. > > -Ryan--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
lq
2008-Feb-25 23:23 UTC
Re: LoadError (Expected websites_controller.rb to define WebsitesController)
you have instance getwebsite method, while error telling you there is no class method with this name. how and where getwebsite is called? On 25 фев, 22:49, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Actually, the error just gets worse for no reason. Now it won''t find > my "getwebsite" function. > > My application does: > include ApplicationHelper > > and ApplicationHelper has: > def getwebpage > id = (params[:id].nil? ? "homepage" : params[:id]) > @webpage = $website.WebPages.find_by_long_id(id) > return @webpage > end > > But I still get undefined local variable or method `getwebsite'' for > ApplicationController:Class. > > On Feb 25, 2:39 pm, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > And occasionally I get other impossibly unhelpful errors: > > > uninitialized constant ApplicationController > > undefined method `getwebsite'' for ApplicationController:Class > > no route found to match "/javascripts/prototype.js" with > > {:method=>:get} > > > On Feb 25, 2:29 pm, kopf1988 <kopf1...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi, > > > > I just removed all my RoR files on my web server and re uploaded them > > > again because I made so many changes to my application. Now all of a > > > sudden, I''m getting the LoadError (Expected websites_controller.rb to > > > define WebsitesController). But this is the first line of my > > > websites_controller.rb: > > > > class WebsitesController < ApplicationController > > > > Any ideas why I might be getting such a crazy error? My application > > > worked fine in the past. > > > > -Ryan--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---