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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T14:05:51+00:00 2026-05-21T14:05:51+00:00

I followed this tutorial to set up Paperclip with s3 on heroku. And it

  • 0

I followed this tutorial to set up Paperclip with s3 on heroku. And it works fine!
But now i moved to a new project, and i tried to replicate the steps i made with the first to make image uploads working. But i’m not able to, and this is driving me crazy! Please help me with this problem… i’ve lost hours and hours. :-/

This is what is happening:
I create an activity choosing a photo, and i think the upload doesn’t even start (it’s too fast!). No error is called, and the “photo” attribute of my activity is /photos/original/missing.png

Here’s my model file:

class Activity < ActiveRecord::Base

  has_many :infos, :dependent => :destroy
  has_many :links, :dependent => :destroy
  has_many :events, :dependent => :destroy

  accepts_nested_attributes_for :infos

  has_attached_file :photo,
    :styles =>{
      :thumb  => "80x60#",
      :medium => "160x120#",
      :large => "320x240#",
      :home => "320x370#"
    },
    :storage => :s3,
    :s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
    :path => ":attachment/activities/:id/:style.:extension",
    :bucket => 'andrea'

end

my Gemfile:

source 'http://rubygems.org'

gem 'rails', '3.0.5'
gem "paperclip", "~> 2.3"
gem 'aws-s3'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19', :require => 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
#   gem 'webrat'
# end

and my s3.yml (with the full keys in the place of “…”):

development:
  bucket: andrea
  access_key_id: AKIAII...
  secret_access_key: vM977oy6W2TIbArCG9...

test:
  bucket: andrea
  access_key_id: AKIAII...
  secret_access_key: vM977oy6W2TIbArCG9...

production:
  bucket: andrea
  access_key_id: AKIAII...
  secret_access_key: vM977oy6W2TIbArCG9...

Here’s the Log:

WARNING: Can't mass-assign protected attributes: infos_attributes
  [1m[36mAREL (0.3ms)[0m  [1mINSERT INTO "activities" ("photo", "created_at", "updated_at", "home", "photo_file_name", "photo_content_type", "photo_file_size", "photo_updated_at", "name") VALUES (NULL, '2011-04-20 13:27:57.428869', '2011-04-20 13:27:57.428869', NULL, NULL, NULL, NULL, NULL, NULL)[0m
[paperclip] Saving attachments.
Redirected to http://localhost:3000/activities/15
Completed 302 Found in 45ms


Started GET "/activities/15" for 127.0.0.1 at 2011-04-20 15:27:57 +0200
  Processing by ActivitiesController#show as HTML
  Parameters: {"id"=>"15"}
  [1m[35mActivity Load (0.9ms)[0m  SELECT "activities".* FROM "activities" WHERE "activities"."id" = 15 LIMIT 1
Rendered activities/show.html.erb within layouts/application (13.5ms)
Completed 200 OK in 39ms (Views: 17.2ms | ActiveRecord: 1.2ms)


Started GET "/photos/large/missing.png" for 127.0.0.1 at 2011-04-20 15:27:57 +0200

ActionController::RoutingError (No route matches "/photos/large/missing.png"):

If you need more informations let me know!

Oh, i’ve tried with heroku restart, but nothing changed.

  • 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-21T14:05:52+00:00Added an answer on May 21, 2026 at 2:05 pm

    Oh yeah!!

    Finally i caught it: I need to change my _form.html.erb, from

    <%= form_for @activity do |f| %>
    ...
    <% end %>
    

    to

    <%= form_for @activity, :html => { :multipart => true } do |f| %>
    ...
    <% end %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've followed this tutorial and it works fine: http://www.dynamicdrive.com/style/csslibrary/item/css-popup-image-viewer/ However my problem is that
I'm new to Applescript, but I followed this handy tutorial, the first Google result
I followed this tutorial . But whenever I try to log in with my
I followed this tutorial and got the basics of Content Providers : http://www.vogella.de/articles/AndroidSQLite/article.html But
I hate starting a post with this but I'm new to Java... I've followed
I followed this code project tutorial for using SharpGL with WPF to create a
So i followed this tutorial to set up the android facebook sdk in my
Ive followed this tutorial to install (multiple) solr instances on tomcat http://wiki.apache.org/solr/SolrTomcat Now i
k, so I was setting up Git and followed this tutorial to set up
I followed the instructions in this tutorial to set up Zend AMF as a

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.