Daniel Smedegaard Buus
2007-Jan-18 08:55 UTC
How can I find out which attribute is screwing up pluralize/singularize?
Hey there :) I''m creating this app on top of a legacy database, that has a mixture of auto_inc ids, non-''id'' named pks, non-integer-pks, foreign keys that end in _code instead of _id, etc. I have the model working great in the console, where I can create any modeled object and reference other objects without issues. However, I''m running into problems with plugins such as GLoc and Scaffold Extension, seemingly because of some attribute names. Scaffolding works without the plugins, but once they''re installed, I get errors like this which is from the Scaffolding Extension: ArgumentError in Admin/crud#edit Showing vendor/plugins/scaffolding_extensions/scaffolds/edit.rhtml where line #3 raised: wrong number of arguments (0 for 1) Extracted source (around line #3): 1: <h1>Editing <%= @scaffold_singular_name.humanize.downcase %></h1> 2: 3: <%= scaffold_form(''update'', :fields=>@scaffold_class.scaffold_edit_fields) %> 4: 5: <%= association_links %> 6: RAILS_ROOT: /home/daniel/Documents/Projects/Eclipse/polybook/config/.. Thing is, this is great info: so, there''s a wrong number of arguments, great! But for which method, and what kind of argument did it expect? What was happening at the time, stuff like that. I can''t guess (not in proper time anyway) which attribute(s) caused this error, so how do I find out? If I knew how to use the Ruby/Rails debugger, I guess that would be great, except it supposedly doesn''t work with Ruby 1.8.5. Help please! Thanks, Daniel :) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jeremy Evans
2007-Jan-18 16:46 UTC
Re: How can I find out which attribute is screwing up pluralize/singularize?
On 1/18/07, Daniel Smedegaard Buus <danielbuus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hey there :) > > I''m creating this app on top of a legacy database, that has a mixture > of auto_inc ids, non-''id'' named pks, non-integer-pks, foreign keys that > end in _code instead of _id, etc. > > I have the model working great in the console, where I can create any > modeled object and reference other objects without issues. > > However, I''m running into problems with plugins such as GLoc and > Scaffold Extension, seemingly because of some attribute names. > Scaffolding works without the plugins, but once they''re installed, I > get errors like this which is from the Scaffolding Extension: > > ArgumentError in Admin/crud#edit > Showing vendor/plugins/scaffolding_extensions/scaffolds/edit.rhtml > where line #3 raised: > wrong number of arguments (0 for 1) > Extracted source (around line #3): > 1: <h1>Editing <%= @scaffold_singular_name.humanize.downcase %></h1> > 2: > 3: <%= scaffold_form(''update'', > :fields=>@scaffold_class.scaffold_edit_fields) %> > 4: > 5: <%= association_links %> > 6: > > RAILS_ROOT: /home/daniel/Documents/Projects/Eclipse/polybook/config/.. > > Thing is, this is great info: so, there''s a wrong number of arguments, > great! But for which method, and what kind of argument did it expect? > What was happening at the time, stuff like that. I can''t guess (not in > proper time anyway) which attribute(s) caused this error, so how do I > find out? If I knew how to use the Ruby/Rails debugger, I guess that > would be great, except it supposedly doesn''t work with Ruby 1.8.5. > > Help please!If you provide a backtrace (check the Rails log) and the contents of the appropriate model file(s), I''ll be able to help you (I''m the author of the plugin). Jeremy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Daniel Smedegaard Buus
2007-Jan-20 17:55 UTC
Re: How can I find out which attribute is screwing up pluralize/singularize?
Hi Jeremy! Coool! I''ll up those things to you just as soon as Monday comes (right now there''s a beer next to my mouse, a girlfriend and pizzas coming, and tomorrow is sushi galore, then comes Monday workie day, LOL :) Till then, great weekend, kick ass, all that :D Daniel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jeremy Evans
2007-Jan-21 04:16 UTC
Re: How can I find out which attribute is screwing up pluralize/singularize?
On 1/20/07, Daniel Smedegaard Buus <danielbuus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Coool! I''ll up those things to you just as soon as Monday comes (right > now there''s a beer next to my mouse, a girlfriend and pizzas coming, > and tomorrow is sushi galore, then comes Monday workie day, LOL :) > > Till then, great weekend, kick ass, all that :DAlso, make sure that you are running the latest revision of the plugin if you are running on Rails 1.2. Previous versions (more than a day old) are designed for Rails 1.1, and will give the error you got with 1.2. Jeremy --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Daniel Smedegaard Buus
2007-Jan-22 08:46 UTC
Re: How can I find out which attribute is screwing up pluralize/singularize?
Hey hey :) I wasn''t running 1.2 before, but I just upgraded, and now that I am, it seems to work fine! And damn, it looks sweet! :) Thanks! :) Daniel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Daniel Smedegaard Buus
2007-Jan-22 08:46 UTC
Re: How can I find out which attribute is screwing up pluralize/singularize?
Hey hey :) I wasn''t running 1.2 before, but I just upgraded, and now that I am, it seems to work fine! And damn, it looks sweet! :) Thanks! :) Daniel --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Daniel Smedegaard Buus
2007-Jan-23 10:02 UTC
Re: How can I find out which attribute is screwing up pluralize/singularize?
Hmmm... Not sure what''s going on here, but I''m back to getting the errors... Right now it''s "wrong number of arguments (0 for 1)", a few minutes back it was "uninitialized constant". Could I persuade you to try and create the database by you and see what happens when you try to scaffold? I have quite a few model files, perhaps it would be better if I could send them all to you via e-mail? You can e-mail me :) Cheers, Daniel :) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Daniel Smedegaard Buus
2007-Jan-23 10:02 UTC
Re: How can I find out which attribute is screwing up pluralize/singularize?
Hmmm... Not sure what''s going on here, but I''m back to getting the errors... Right now it''s "wrong number of arguments (0 for 1)", a few minutes back it was "uninitialized constant". Could I persuade you to try and create the database by you and see what happens when you try to scaffold? I have quite a few model files, perhaps it would be better if I could send them all to you via e-mail? You can e-mail me :) Cheers, Daniel :) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Daniel Smedegaard Buus
2007-Jan-23 10:16 UTC
Re: How can I find out which attribute is screwing up pluralize/singularize?
Daniel Smedegaard Buus wrote:> Hmmm... > > Not sure what''s going on here, but I''m back to getting the errors... > Right now it''s "wrong number of arguments (0 for 1)", a few minutes > back it was "uninitialized constant". > > Could I persuade you to try and create the database by you and see what > happens when you try to scaffold? I have quite a few model files, > perhaps it would be better if I could send them all to you via e-mail? > You can e-mail me :) >Sorry, sorry, sorry! It was a failure to update my model after changing the name of an associated table! All is well. I''ll shut up now :) Also sorry about the double posts, I don''t know what''s up with Google. I''m replying through "more options" now, might fix it.> Cheers, > Daniel :)--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Maybe Matching Threads
- Singularize and Pluralize of the word Faculty
- Inflector::pluralize("Agencies")=="Agency" ?
- Error using dsync to convert really old mboxes to Maildir and workaround
- Bug#287184: logcheck overwriting ownership/permissions of /etc/logcheck/* on upgrades
- Default Scaffolding Gives Errors