I''m used the attachment_fu plugin, something has gone wrong here as I tried to upload a picture. ActiveRecord::StatementInvalid in PortfolioController#create Mysql::Error: #23000Duplicate entry ''1'' for key 1: INSERT INTO portfolios (`content_type`, `size`, `thumbnail`, `filename`, `height`, `parent_id`, `width`) VALUES(''image/jpeg'', 45256, ''thumb'', ''godjesus_thumb.jpg'', 81, 1, 100) as I try it a second time I recieve the same error except it states " entry ''2'' " instead of " entry ''1'' " Mysql::Error: #23000Duplicate entry ''2'' for key 1: INSERT INTO portfolios (`content_type`, `size`, `thumbnail`, `filename`, `height`, `parent_id`, `width`) VALUES(''image/jpeg'', 45256, ''thumb'', ''godjesus_thumb.jpg'', 81, 2, 100) Still NOTHING happens in the portfolios-table... I''ve been following the tutorial @ http://www.clarkware.com/cgi/blosxom/2007/02/24 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
You''ve set parent_id to be a primary key. On Feb 6, 2008 2:17 AM, Dag Stensson <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > I''m used the attachment_fu plugin, something has gone wrong here as I > tried to upload a picture. > > ActiveRecord::StatementInvalid in PortfolioController#create > > Mysql::Error: #23000Duplicate entry ''1'' for key 1: INSERT INTO > portfolios (`content_type`, `size`, `thumbnail`, `filename`, `height`, > `parent_id`, `width`) VALUES(''image/jpeg'', 45256, ''thumb'', > ''godjesus_thumb.jpg'', 81, 1, 100) > > as I try it a second time I recieve the same error except it states " > entry ''2'' " instead of " entry ''1'' " > > Mysql::Error: #23000Duplicate entry ''2'' for key 1: INSERT INTO > portfolios (`content_type`, `size`, `thumbnail`, `filename`, `height`, > `parent_id`, `width`) VALUES(''image/jpeg'', 45256, ''thumb'', > ''godjesus_thumb.jpg'', 81, 2, 100) > > Still NOTHING happens in the portfolios-table... > > I''ve been following the tutorial @ > http://www.clarkware.com/cgi/blosxom/2007/02/24 > -- > Posted via http://www.ruby-forum.com/. > > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ryan Bigg wrote:> You''ve set parent_id to be a primary key. > > On Feb 6, 2008 2:17 AM, Dag Stensson <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > >> >> I''ve been following the tutorial @ >> http://www.clarkware.com/cgi/blosxom/2007/02/24 >> -- >> Posted via http://www.ruby-forum.com/. >> >> > >> > > > -- > Ryan Bigg > http://www.frozenplague.net > Feel free to add me to MSN and/or GTalk as this email.Ah, thanks. That was an easy one for you! ;D -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---