Brian Leroux
2007-Jul-09 19:18 UTC
ugly issue with resource named ''Wave'' --reserved word?
Helpers for a resource aren''t being generated... I can consistently reproduce but I''m not sure how to further debug the issue or if its a reserved term that shouldn''t be used at all.> rails testing > cd testing > script/generate scaffold_resource wave title:string > mysqlmysql> create database testing_development; mysql> exit> rake db:migrate > mongrel_rails startBrowsing any page will show the helpers aren''t being created. I think it may be a bug but I''m not sure. If I hardcode the helpers it appears to work until I try and use the wave model in an association -- then it returns an uninitialized constant error about Person::Wafe ??? Here is my script/about: Ruby version 1.8.5 (i686-darwin8.8.1) RubyGems version 0.9.0 Rails version 1.2.3 Active Record version 1.15.3 Action Pack version 1.13.3 Action Web Service version 1.2.3 Action Mailer version 1.3.3 Active Support version 1.4.2 Application root /Users/westcoastlogic/Repository/testing Environment development Database adapter mysql Database schema version 2 Also:>> puts ActionController::Routing::Routes.routesGET /waves/ {:controller=>"waves", :action=>"index"} GET /waves.:format/ {:controller=>"waves", :action=>"index"} POST /waves/ {:controller=>"waves", :action=>"create"} POST /waves.:format/ {:controller=>"waves", :action=>"create"} GET /waves/new/ {:controller=>"waves", :action=>"new"} GET /waves/new.:format/ {:controller=>"waves", :action=>"new"} GET /waves/:id;edit/ {:controller=>"waves", :action=>"edit"} GET /waves/:id.:format;edit/ {:controller=>"waves", :action=>"edit"} GET /waves/:id/ {:controller=>"waves", :action=>"show"} GET /waves/:id.:format/ {:controller=>"waves", :action=>"show"} PUT /waves/:id/ {:controller=>"waves", :action=>"update"} PUT /waves/:id.:format/ {:controller=>"waves", :action=>"update"} DELETE /waves/:id/ {:controller=>"waves", :action=>"destroy"} DELETE /waves/:id.:format/ {:controller=>"waves", :action=>"destroy"} Looks right to me? Not sure how to further debug. Any insight really appreciated! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Brian Leroux
2007-Jul-09 20:32 UTC
Re: ugly issue with resource named ''Wave'' --reserved word?
Update: we''ve found that *any* resource ending in ''ve'' will fail. I''m not sure how to further test/debug/thus fix this issue -- my knowledge of the innerworkings of resources.rb is limited and hope somone here can help point the way. Thanks again -- bri On Jul 9, 12:18 pm, Brian Leroux <brian.ler...@gmail.com> wrote:> Helpers for a resource aren''t being generated... I can consistently > reproduce but I''m not sure how to further debug the issue or if its a > reserved term that shouldn''t be used at all. > > > rails testing > > cd testing > > script/generate scaffold_resource wave title:string > > mysql > > mysql> create database testing_development; > mysql> exit > > > rake db:migrate > > mongrel_rails start > > Browsing any page will show the helpers aren''t being created. I think > it may be a bug but I''m not sure. If I hardcode the helpers it appears > to work until I try and use the wave model in an association -- then > it returns an uninitialized constant error about Person::Wafe ??? > > Here is my script/about: > Ruby version 1.8.5 (i686-darwin8.8.1) > RubyGems version 0.9.0 > Rails version 1.2.3 > Active Record version 1.15.3 > Action Pack version 1.13.3 > Action Web Service version 1.2.3 > Action Mailer version 1.3.3 > Active Support version 1.4.2 > Application root /Users/westcoastlogic/Repository/testing > Environment development > Database adapter mysql > Database schema version 2 > > Also:>> puts ActionController::Routing::Routes.routes > > GET /waves/ {:controller=>"waves", > :action=>"index"} > GET /waves.:format/ {:controller=>"waves", > :action=>"index"} > POST /waves/ {:controller=>"waves", > :action=>"create"} > POST /waves.:format/ {:controller=>"waves", > :action=>"create"} > GET /waves/new/ {:controller=>"waves", > :action=>"new"} > GET /waves/new.:format/ {:controller=>"waves", > :action=>"new"} > GET /waves/:id;edit/ {:controller=>"waves", > :action=>"edit"} > GET /waves/:id.:format;edit/ {:controller=>"waves", > :action=>"edit"} > GET /waves/:id/ {:controller=>"waves", > :action=>"show"} > GET /waves/:id.:format/ {:controller=>"waves", > :action=>"show"} > PUT /waves/:id/ {:controller=>"waves", > :action=>"update"} > PUT /waves/:id.:format/ {:controller=>"waves", > :action=>"update"} > DELETE /waves/:id/ {:controller=>"waves", > :action=>"destroy"} > DELETE /waves/:id.:format/ {:controller=>"waves", > :action=>"destroy"} > > Looks right to me? > > Not sure how to further debug. Any insight really appreciated!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Paolo Negri
2007-Jul-09 20:51 UTC
Re: ugly issue with resource named ''Wave'' --reserved word?
I think the root of your problem is in the Inflector>> "waves".singularize=> "wafe" So rails thinks the singular for ''waves'' is ''wafe'' Can you check if adding in your config Inflector.inflections do |inflect| inflect.irregular ''wave'', ''waves'' end fixes the issue? Paolo On 09/07/07, Brian Leroux <brian.leroux@gmail.com> wrote:> > Update: we''ve found that *any* resource ending in ''ve'' will fail. I''m > not sure how to further test/debug/thus fix this issue -- my knowledge > of the innerworkings of resources.rb is limited and hope somone here > can help point the way. > > Thanks again -- bri > > > On Jul 9, 12:18 pm, Brian Leroux <brian.ler...@gmail.com> wrote: > > Helpers for a resource aren''t being generated... I can consistently > > reproduce but I''m not sure how to further debug the issue or if its a > > reserved term that shouldn''t be used at all. > > > > > rails testing > > > cd testing > > > script/generate scaffold_resource wave title:string > > > mysql > > > > mysql> create database testing_development; > > mysql> exit > > > > > rake db:migrate > > > mongrel_rails start > > > > Browsing any page will show the helpers aren''t being created. I think > > it may be a bug but I''m not sure. If I hardcode the helpers it appears > > to work until I try and use the wave model in an association -- then > > it returns an uninitialized constant error about Person::Wafe ??? > > > > Here is my script/about: > > Ruby version 1.8.5 (i686-darwin8.8.1) > > RubyGems version 0.9.0 > > Rails version 1.2.3 > > Active Record version 1.15.3 > > Action Pack version 1.13.3 > > Action Web Service version 1.2.3 > > Action Mailer version 1.3.3 > > Active Support version 1.4.2 > > Application root /Users/westcoastlogic/Repository/testing > > Environment development > > Database adapter mysql > > Database schema version 2 > > > > Also:>> puts ActionController::Routing::Routes.routes > > > > GET /waves/ {:controller=>"waves", > > :action=>"index"} > > GET /waves.:format/ {:controller=>"waves", > > :action=>"index"} > > POST /waves/ {:controller=>"waves", > > :action=>"create"} > > POST /waves.:format/ {:controller=>"waves", > > :action=>"create"} > > GET /waves/new/ {:controller=>"waves", > > :action=>"new"} > > GET /waves/new.:format/ {:controller=>"waves", > > :action=>"new"} > > GET /waves/:id;edit/ {:controller=>"waves", > > :action=>"edit"} > > GET /waves/:id.:format;edit/ {:controller=>"waves", > > :action=>"edit"} > > GET /waves/:id/ {:controller=>"waves", > > :action=>"show"} > > GET /waves/:id.:format/ {:controller=>"waves", > > :action=>"show"} > > PUT /waves/:id/ {:controller=>"waves", > > :action=>"update"} > > PUT /waves/:id.:format/ {:controller=>"waves", > > :action=>"update"} > > DELETE /waves/:id/ {:controller=>"waves", > > :action=>"destroy"} > > DELETE /waves/:id.:format/ {:controller=>"waves", > > :action=>"destroy"} > > > > Looks right to me? > > > > Not sure how to further debug. Any insight really appreciated!--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Brian LeRoux
2007-Jul-09 20:59 UTC
Re: ugly issue with resource named ''Wave'' --reserved word?
Holeee crap Paolo thank you so very much -- I tested pluralize but it worked correctly but never thought to test singularize. Unreal! Hasn''t anyone built an application with Slaves or perhaps a Cave resource/model in the past four months? ;) On 7/9/07, Paolo Negri <hungrylist@gmail.com> wrote:> > I think the root of your problem is in the Inflector > > >> "waves".singularize > => "wafe" > > So rails thinks the singular for ''waves'' is ''wafe'' > > Can you check if adding in your config > > Inflector.inflections do |inflect| > inflect.irregular ''wave'', ''waves'' > end > > fixes the issue? > > Paolo > > On 09/07/07, Brian Leroux <brian.leroux@gmail.com> wrote: > > > > Update: we''ve found that *any* resource ending in ''ve'' will fail. I''m > > not sure how to further test/debug/thus fix this issue -- my knowledge > > of the innerworkings of resources.rb is limited and hope somone here > > can help point the way. > > > > Thanks again -- bri > > > > > > On Jul 9, 12:18 pm, Brian Leroux <brian.ler...@gmail.com> wrote: > > > Helpers for a resource aren''t being generated... I can consistently > > > reproduce but I''m not sure how to further debug the issue or if its a > > > reserved term that shouldn''t be used at all. > > > > > > > rails testing > > > > cd testing > > > > script/generate scaffold_resource wave title:string > > > > mysql > > > > > > mysql> create database testing_development; > > > mysql> exit > > > > > > > rake db:migrate > > > > mongrel_rails start > > > > > > Browsing any page will show the helpers aren''t being created. I think > > > it may be a bug but I''m not sure. If I hardcode the helpers it appears > > > to work until I try and use the wave model in an association -- then > > > it returns an uninitialized constant error about Person::Wafe ??? > > > > > > Here is my script/about: > > > Ruby version 1.8.5 (i686-darwin8.8.1) > > > RubyGems version 0.9.0 > > > Rails version 1.2.3 > > > Active Record version 1.15.3 > > > Action Pack version 1.13.3 > > > Action Web Service version 1.2.3 > > > Action Mailer version 1.3.3 > > > Active Support version 1.4.2 > > > Application root /Users/westcoastlogic/Repository/testing > > > Environment development > > > Database adapter mysql > > > Database schema version 2 > > > > > > Also:>> puts ActionController::Routing::Routes.routes > > > > > > GET /waves/ {:controller=>"waves", > > > :action=>"index"} > > > GET /waves.:format/ {:controller=>"waves", > > > :action=>"index"} > > > POST /waves/ {:controller=>"waves", > > > :action=>"create"} > > > POST /waves.:format/ {:controller=>"waves", > > > :action=>"create"} > > > GET /waves/new/ {:controller=>"waves", > > > :action=>"new"} > > > GET /waves/new.:format/ {:controller=>"waves", > > > :action=>"new"} > > > GET /waves/:id;edit/ {:controller=>"waves", > > > :action=>"edit"} > > > GET /waves/:id.:format;edit/ {:controller=>"waves", > > > :action=>"edit"} > > > GET /waves/:id/ {:controller=>"waves", > > > :action=>"show"} > > > GET /waves/:id.:format/ {:controller=>"waves", > > > :action=>"show"} > > > PUT /waves/:id/ {:controller=>"waves", > > > :action=>"update"} > > > PUT /waves/:id.:format/ {:controller=>"waves", > > > :action=>"update"} > > > DELETE /waves/:id/ {:controller=>"waves", > > > :action=>"destroy"} > > > DELETE /waves/:id.:format/ {:controller=>"waves", > > > :action=>"destroy"} > > > > > > Looks right to me? > > > > > > Not sure how to further debug. Any insight really appreciated! > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Sandofsky
2007-Jul-09 22:47 UTC
Re: ugly issue with resource named ''Wave'' --reserved word?
It threw a wrench in our Web 2.0 social network for civil war reenactments. On Jul 9, 1:59 pm, "Brian LeRoux" <brian.ler...@gmail.com> wrote:> Unreal! Hasn''t anyone built an application with Slaves or perhaps a > Cave resource/model in the past four months? ;)--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---