Colin Law wrote in post #1166375:
I thought of adding .to_s to @image, but that leads me to the error:
Paperclip::adapterregistry::nohandlererror in PinsController#copy
No handler found for
"/system/pins/images/000/000/083/original/Alt-J_-_This_is_all_yours.jpg?1420125230"
Because, again, you have not copy/pasted the complete message, and
possibly stack trace, from the terminal I do not know which line of
code generated that error so have no idea of the cause.
I think I need to tell it to just pic out the .jpg itself, not the whole
directory listing. Does that sound right?
<shrug/>
Colin
Hi Colin, and thanks again for taking the time. Understood that you want
the terminal error. This is the full error that I get in the terminal
tail:
Paperclip::AdapterRegistry::NoHandlerError (No handler found for
"/system/pins/images/000/000/084/original/Angel.png?1420769160"):
app/controllers/pins_controller.rb:46:in `copy'
I read through the Paperclip gem documentation on Github:
GitHub - thoughtbot/paperclip: Easy file attachment management for ActiveRecord but that hasn't gotten me
anywhere.
I;m not sure if this helps as well, but here is what an image looks like
when I call it in the console. First with adding .to_s to see it as a
string, and secondly to show it without converting it to string.
2.0.0-p353 :019 > p.image.to_s
=>
"/system/pins/images/000/000/083/original/Alt-J_-_This_is_all_yours.jpg?1420125230"
2.0.0-p353 :020 > p.image
=> #<Paperclip::Attachment:0x0000010611a3f8 @name=:image,
@instance=#<Pin id: 83, description: "<p>Good</p>\r\n", created_at:
"2015-01-01 15:13:51", updated_at: "2015-01-01 15:13:51", user_id: 3,
image_file_name: "Alt-J_-_This_is_all_yours.jpg", image_content_type:
"image/jpeg", image_file_size: 23265, image_updated_at: "2015-01-01
15:13:50", image_remote_url: nil, artist: "Alt-J", album: "This Is All
Yours", date: nil, rank: nil, video_html: "", video: "", rating: "3",
year: "2014", title: "">, @options={:convert_options=>{},
:default_style=>:original,
:default_url=>"/:attachment/:style/missing.png", :escape_url=>true,
:restricted_characters=>/[&$+,\/:;=?@<>\[\]\{\}\|\\\^~%# ]/,
:filename_cleaner=>nil,
:hash_data=>":class/:attachment/:id/:style/:updated_at",
:hash_digest=>"SHA1", :interpolator=>Paperclip::Interpolations,
:only_process=>, :path=>":rails_root/public:url",
:preserve_files=>false, :processors=>[:thumbnail],
:source_file_options=>{}, :storage=>:filesystem,
:styles=>{:medium=>"320x240>"},
:url=>"/system/:class/:attachment/:id_partition/:style/:filename",
:url_generator=>Paperclip::UrlGenerator, :use_default_time_zone=>true,
:use_timestamp=>true, :whiny=>true,
:check_validity_before_processing=>true}, @post_processing=true,
@queued_for_delete=, @queued_for_write={}, @errors={}, @dirty=false,
@interpolator=Paperclip::Interpolations,
@url_generator=#<Paperclip::UrlGenerator:0x0000010611a290
@attachment=#<Paperclip::Attachment:0x0000010611a3f8 ...>,
@attachment_options={:convert_options=>{}, :default_style=>:original,
:default_url=>"/:attachment/:style/missing.png", :escape_url=>true,
:restricted_characters=>/[&$+,\/:;=?@<>\[\]\{\}\|\\\^~%# ]/,
:filename_cleaner=>nil,
:hash_data=>":class/:attachment/:id/:style/:updated_at",
:hash_digest=>"SHA1", :interpolator=>Paperclip::Interpolations,
:only_process=>, :path=>":rails_root/public:url",
:preserve_files=>false, :processors=>[:thumbnail],
:source_file_options=>{}, :storage=>:filesystem,
:styles=>{:medium=>"320x240>"},
:url=>"/system/:class/:attachment/:id_partition/:style/:filename",
:url_generator=>Paperclip::UrlGenerator, :use_default_time_zone=>true,
:use_timestamp=>true, :whiny=>true,
:check_validity_before_processing=>true}>, @source_file_options={},
@whiny=true,
@normalized_styles={:medium=>#<Paperclip::Style:0x000001061211d0
@name=:medium, @attachment=#<Paperclip::Attachment:0x0000010611a3f8
...>, @geometry="320x240>", @format=nil, @other_args={}>}>
I have a question on Stack Overflow as well:
Thanks again for any help!