# General troubleshooting

**URL:** <https://www.ruby-forum.com/t/general-troubleshooting/125099>\
**Category:** Rails\
**Created:** [January 5, 2008, 11:39am UTC](https://www.ruby-forum.com/t/general-troubleshooting/125099 "2008-01-05T11:39:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thufir](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ee7513/32.png) [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Post date:** [January 5, 2008, 11:39am UTC](https://www.ruby-forum.com/t/general-troubleshooting/125099/1 "2008-01-05T11:39:46Z")

</div>

I want to do something like:

raise Tag.find\_or\_create\_by\_tag([:which\_tag])

to troubleshoot the add\_some\_tags method of the feeds controller:

[http://strawr.googlecode.com/svn/trunk/app/controllers/feeds\_controller.rb](http://strawr.googlecode.com/svn/trunk/app/controllers/feeds_controller.rb)

How would I go about that? the error message I’m troubleshooting:

ActiveRecord::HasManyThroughCantAssociateNewRecords in  
FeedsController#add\_some\_tags

Cannot associate new records through ‘Feed#colors’ on ‘#’. Both records  
must have an id in order to create the has\_many :through record  
associating them.

thanks,

Thufir
