On 8 January 2015 at 22:46, Tony T. <li...@ruby-forum.com> wrote: > Colin Law wrote in post #1166334: >> >> For future reference it is better to copy the error text from the >> terminal window and paste it here rather than attaching an image, then >> I would be able to insert my text at the appropriate point in the >> error. >> >> I assume that the image field in the db is a string field. You are >> calling Pin.new with a URI object as the image and the error says that >> there is not an implicit way of converting the URI to a string. I >> guess that you want to use @image.to_s in Pin.new. >> >> Colin > > Hi Colin, > Thanks for answering. I posted "Here is the pins_controller.rb code > I'm using, which gives me an error > of "no implicit conversion of URI::Generic into String"" in the > question above. Is there something else that I should have added so > that I know in the future?
Yes, as I said, you attached an image instead of copy/pasting the equivalent text out of the terminal window (including some of the stack trace if appropriate). When asking questions it is important to make life as easy as possible for those who may be able to help, to understand the question. We are used to seeing error messages in the terminal window and immediately understanding the context. In order to see which line was generating the error I had to go and look at the image. > > 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLta-%3Dji5d%3DpD6yEyxQZj-pu%3D3ayTWdmESUScXN4Hjii4w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.