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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:55:33+00:00 2026-05-24T02:55:33+00:00

I am apparently having a huge problem switching from the plugin version of Paperclip

  • 0

I am apparently having a huge problem switching from the plugin version of Paperclip to the gem version in my app. It’s been my impression that there should be no difference whatsoever between a plugin and a gem of a specified version. However, I’m not seeing this as an easy transition at all.

Rails 2.3.11, Ruby 1.8.7

The plugin version I am using is version 2.3.3 and was upgraded on August 2, 2010. Attempting to update this to the gem of the same version basically killed all my tests, not being able to load a factory model which did not have its attachment loaded. It appeared that validate_attachment_content_type was also attempting to validate the attachment presence, and couldn’t find it, so everything just started breaking. Again, with the plugin there are no problems and I haven’t had any problems in all this time we’ve been using it. On the other hand, this problem seems to not occur past version 2.3.4. That’s a whole other set of problems.

Basically, in all versions from 2.3.4 and up I get the problem below:

can't convert nil into String
/home/joshua/.rvm/gems/ruby-1.8.7-p334@paperclip_upgrade/gems/paperclip-2.3.15/lib/paperclip/storage/s3.rb:163:in `extname'
/home/joshua/.rvm/gems/ruby-1.8.7-p334@paperclip_upgrade/gems/paperclip-2.3.15/lib/paperclip/storage/s3.rb:163:in `to_file'
/home/joshua/.rvm/gems/ruby-1.8.7-p334@paperclip_upgrade/gems/paperclip-2.3.15/lib/paperclip/attachment.rb:94:in `assign'
/home/joshua/.rvm/gems/ruby-1.8.7-p334@paperclip_upgrade/gems/paperclip-2.3.15/lib/paperclip.rb:279:in `avatar='
/home/joshua/railscamp/app/app/models/organization.rb:311:in `copy_membership'

in all my tests that access my organization model.

The apparent offending code in this case is attempting to clone a membership model from one organization to another, with the * line being the offending call.

  def copy_membership(membership)
    m = membership.clone
    u = m.user.clone
    u.organization = self
    m.organization = self

    begin
      m.avatar = membership.avatar         *
    rescue RuntimeError
      m.avatar = nil
    end

    m.user = u
    m.save
    m
  end

Does this make any sense to anyone? Why would the plugin work, but the gem of the same version just wrecks everything?

Update: I also don’t appear to have any paperclip rake tasks available. Any ideas?

  • 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-24T02:55:34+00:00Added an answer on May 24, 2026 at 2:55 am

    As it turns out, we should have been checking whether the filename is valid or not, rather than depending on a generic runtime error for detecting avatar presence.

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

Sidebar

Related Questions

Apparently there's a lot of variety in opinions out there, ranging from, " Never!
Having some problems with a solution that apparently works: <script type=text/javascript > //following code
I am having a fairly huge problem. I am hoping this is due to
I'm having an issue that apparently many people have had as well, only what
Apparently, they're confusing. Is that seriously the reason? Can you think of any others?
Apparently I can't move files on different volumes using Directory.Move. I have read that
Apparently some vendors (like Telerik) are working on versions of their controls that do
With OS X 10.5.7 coming out, there's been a lot of talk about apps
Having a bit of a problem with my hosted ASP.NET applications. I noticed slowness
I'm having a problem where the asset tag time stamp is not being applied

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.