Reputation: 4728
Paperclip is working fine on my localhost but when I am trying to upload images on my server, I am getting this error (as shown in my production.rb log file)
ActionController::RoutingError (No route matches [GET]
I am very surprised why this is happening. I have not put any :url or :path in any model since anyway it is working fine on localhost without it (I see some of the other answers suggesting that but I am not sure this is the problem). Any one with suggestions on how to fix this paperclip problem ?
EDIT - Ok, while creating a page which has attachment and when I am uploading image, the image is not uploading, I am getting the error above and the image of the path is http://example.com/system/photos/preview_images//original/home.png?1369929849, see the two //, why is this so ? there should be 000/000/004 or something like this there, right ?
Upvotes: 0
Views: 1023
Reputation: 29349
If your server is using ssl, you might have to use url instead of path. It works fine in localhost because your localhost will not be using ssl.
For example
=link_to "something", some_path
should be replaced with
=link_to "something", some_url
Upvotes: 1