Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7947567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:28:09+00:00 2026-06-04T01:28:09+00:00

I get an error that look like this: undefined method `post_image_will_change!’ for #<Post:0xf4e9184> app/controllers/posts_controller.rb:43:in

  • 0

I get an error that look like this:

undefined method `post_image_will_change!' for #<Post:0xf4e9184>
app/controllers/posts_controller.rb:43:in `new'
app/controllers/posts_controller.rb:43:in `create'

I’ve included this in my “post” model:

 attr_accessible :title, :name, :content, :post_image
 mount_uploader :post_image, PostImageUploader

and in _form.html.erb I’ve added:

 :html =>  { :multipart => true }

I looked CarrierWave Error but that doesn’t help me.

Any clues of what generates that error? I’ve migrated the database and so forth (followed the railscasts guide on carrierwave exactly..)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T01:28:10+00:00Added an answer on June 4, 2026 at 1:28 am

    The OP comments that he fixed it, however there’s no answer set so I thought I’d add one for people coming across this in the future, which included myself until I figured it out 🙂

    undefined method `x_will_change!’ for # happens if you forget to add a column in your model’s db table. If you have a model User and a AvatarUploader, with the uploader mounted as in the Carrierwave docs:

    class User < ActiveRecord::Base
      mount_uploader :avatar, AvatarUploader
    end
    

    Then the error will read

    undefined method `avatar_will_change!' for #<User:0x00...>
    

    To fix it (based on this example) add a column in a migration run the following in the console:

    rails g migration AddAvatarToUsers avatar:string
    

    This will generate the following migration:

    class AddAvatarToUsers < ActiveRecord::Migration
      def change
        add_column :users, :avatar, :string
      end
    end
    

    Then migrate to apply the change (again in the console):

    rake db:migrate
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get Strings from a server that look something like this: This is normal
I currently have two arrays that look like this: Swatches: Array ( [0] =>
Let's say I have a couple of entities that look like this: @Entity public
I have a link that look like this: www.localsite.dev/posts/332635955335419755 which works pretty well and
I have database tables that look like this: A Task can be mapped to
I get an error that says Parse error: syntax error, unexpected T_PRIVATE in E:\PortableApps\xampp\htdocs\SN\AC\ACclass.php
while executing the following query, i get an error that there's an error in
I get that error with the following code. anyone know why? function validateAdminInput(){ var
Please help with the following error that I get with Spring Security 3.05 and
How do I unit test my code that has LTS Datacontext. I get error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.