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 8515537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:10:27+00:00 2026-06-11T05:10:27+00:00

Im debugging my rails app with an iOS client. Its a photo sharing and

  • 0

Im debugging my rails app with an iOS client. Its a photo sharing and uploading app that Im following from

I finished the client part where the photos show up around the cleint. The next part which includes uploading images to the server from the client is where there are errors happening. Im using a ‘puts @photos’ statement in the controller to see the variable created after the upload.

This is the error that been thrown after a photo is uploaded from the device

 19:07:06 web.1  | Started POST "/photos" for 127.0.0.1 at 2012-09-11 19:07:05 -0700
 19:07:06 web.1  | Connecting to database specified by database.yml
 19:07:06 web.1  | Processing by PhotosController#create as JSON
 19:07:06 web.1  |   Parameters: {"photo%5Blat%5D"=>"37.785834", 
 "photo%5Blng%5D"=>"-122.406417", "photo"=>{"image"=>#
 <ActionDispatch::Http::UploadedFile:0x007ff3cf0a3870 
 @original_filename="image.jpg", @content_type="image/jpeg", 
 @headers="Content-Disposition: form-data; name=\"photo[image]\"; 
 filename=\"image.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#
 <File:/var/folders/dh/1k2rdp_51yd2k43xzkc2pmdh0000gn/T/RackMultipart20120911-22662-1walqgi>>}}
 19:07:06 web.1  | Completed 500 Internal Server Error in 55ms
 19:07:06 web.1  | ActiveModel::MassAssignmentSecurity::Error (Can't mass-assign protected attributes: image):
 19:07:06 web.1  |   app/controllers/photos_controller.rb:51:in `new'
 19:07:06 web.1  |   app/controllers/photos_controller.rb:51:in `create'
  • 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-11T05:10:29+00:00Added an answer on June 11, 2026 at 5:10 am

    You’re getting a mass-assignment error on the image attribute of the Photo model. Just add:

    attr_accessible :image
    

    somewhere in the model and it should work. See the documentation for details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From the Rails Guide on debugging, I found that I can customize output to
I have a Rails application but after some time of development/debugging I realized that
Basic Information I have a rails app A that is connected to a mysql
I have an app that is using devise for authentication. Rails 3 on ruby
I am making a Rails 3.1 app and have a signup form that was
So I've upgraded an app from rails 2.2 to 2.3.12 and my last remaining
I'm writing a Ruby on Rails app. The following jQuery code is included in
I have a Rails app that has been running fine for months. The other
Is rails debugging supported on Aptana Studio 3. I have earlier debugged Rails applications
when debugging java code, in the stack trace, I noticed that something in the

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.