0

I'm working on a Rails app and feeling stuck on this one after a few hours trying to get through it, would love some help. I'm running sqlite on my local server and Postgres on Heroku. I think this may be part of the problem. Basically, I run the same command on the console of each and it isn't working in Heroku.

I created a model and a seed file to populate the model. The seed file calls a series of run commands like:

 Blog.create(filename: 'nathan_maton_4see.png', caption: 'Lead Developer', isfeatured: true, subcaption: 'Game',full_img1: 'nathan_maton_4see_full.png', full_img2: 'nathan_maton_team_committment.png', full_title: 'Yessir', full_body: 'Worked with several social entrepreneurship training programs.')

If I run that line of code on my rails console it works, but on Heroku it flags WARNING: Can't mass-assign protected attributes: isfeatured, subcaption, full_img1, full_img2, full_title, full_body.

Here's the model file I'm using:

 class Blog < ActiveRecord::Base
   attr_accessible :caption, :filename, :isfeatured, :subcaption, :full_img1, :full_img2, :full_title, :full_body
Himanshu
  • 31,810
  • 31
  • 111
  • 133
siculo23
  • 13
  • 2
  • Have you done the usual migrate and restart routine on your heroku? – Jason Kim Sep 10 '12 at 19:53
  • Thanks for the note garbage collection. I had tried that, I came back to it just about 30 mins ago and standardized all of the content being added to only use '' and not "" & '' and then it seemed to work. Not sure if that was it, but that's my best guess. – siculo23 Sep 10 '12 at 22:03
  • Congrats! Could've been anything. It's heroku :P – Jason Kim Sep 10 '12 at 22:12

0 Answers0