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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:09:34+00:00 2026-05-26T21:09:34+00:00

Before updating my Macbook I used Ruby 1.8.7 and Rails 3.0.9 my app worked

  • 0

Before updating my Macbook I used Ruby 1.8.7 and Rails 3.0.9 my app worked very nice.

UPD: actually the problem was different, see the answer below.

Now I have the same Rails (as it is in Gemfile) but Ruby Version is 1.9.2, and I have some problems with it. So the one of them is that I’ve lost the ability to upload files through valums AJAX uploader and rawfileupload. It seems clear, all the data is passed through:

{"photo"=>{
  "image"=>#<ActionDispatch::Http::UploadedFile:0x007fd47fe5df20 
     @original_filename="appleberry.jpg", @content_type="image/jpeg", @headers=nil, 
     @tempfile=#<File:blah-blah a real file, i can see it>}, 
  "album_id"=>"6", 
  "authenticity_token"=>"<is ok>=", "qqfile"=>"appleberry.jpg"
}

But then I get the following SQL insert:

INSERT INTO "photos" (
  "name", "description", 
  "created_at", "updated_at", 
  "album_id", "image_file_name", 
  "image_content_type", "image_file_size", 
  "image_updated_at", "created_by") 
VALUES (NULL, NULL, 
  '2011-10-23 19:08:18.746030', '2011-10-23 19:08:18.746030', 
  6, NULL, 
  NULL, NULL, 
  NULL, NULL)

It can`t be a controller, because it`s supersimple

@photo = Photo.new(params[:image])
@photo.album_id = params[:album_id]

if @photo.save
   ...

That’s a nasty problem, I tried even to downgrade to ruby 1.8.7, since I’m using rvm, but I haven’t got it yet. If the best way is using 1.8.7 I’ll do so, but, please, tell my how =)

Thanks!

  • 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-05-26T21:09:34+00:00Added an answer on May 26, 2026 at 9:09 pm

    It was my mistake, as I found out. In rails I had a wrong declaration of Photo.new(), I used params[:image] but it should have been params[:photo]. And that`s why I got a lot of NULLs in a query.

    Just keep it in mind next time, saving images

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

Sidebar

Related Questions

I'm publishing an app on android market. Before updating it to a new version
Yesterday before updating the Google App Engine SDK, I was able to do python
I want to backup my existing ASP.net web app before updating it. Therefore I
Before updating jquery mobile on a site from version: v1.0b1 to the present: 1.2.0,
Is there any disadvantage of locking a record before updating it?
(Possible it works as designed, but I'm sure it was working before updating to
I'd like to copy a table's row before updating and I'm trying to do
I wanted to test if a key exists in a dictionary before updating the
My Rails app is hosted on Heroku. I would like to have another server
I've just upgraded to Rails 3.2.1 with Ruby 1.9.3-p0 and I'm using Machinist 2.0.

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.