insert to database error on heroku but worked locally, ActiveRecord::StatementInvalid
问题 I have 2 models: class User < ActiveRecord::Base has_many :micro_posts, :dependent => :destroy .. def add_post(post) self.micro_posts << post end class MicroPost < ActiveRecord::Base belongs_to :user ... and the migration: class CreateMicroPosts < <ActiveRecord::Migration def change create_table :micro_posts do |t| ... And when I called add_post on heroku server, I got an error: 2012-02-06T02:59:58+00:00 app[web.1]: ActiveRecord::StatementInvalid (ArgumentError: wrong number of arguments (1