Duplicate entry '1' for key 1

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

You’ve set parent_id to be a primary key.

On Feb 6, 2008 2:17 AM, Dag S. [email protected]
wrote:

I’ve been following the tutorial @
http://www.clarkware.com/cgi/blosxom/2007/02/24

Posted via http://www.ruby-forum.com/.


Ryan B.

Feel free to add me to MSN and/or GTalk as this email.

Ryan B. wrote:

You’ve set parent_id to be a primary key.

On Feb 6, 2008 2:17 AM, Dag S. [email protected]
wrote:

I’ve been following the tutorial @
http://www.clarkware.com/cgi/blosxom/2007/02/24

Posted via http://www.ruby-forum.com/.


Ryan B.
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