You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 4, 2019. It is now read-only.
I just installed this gem and followed the readme me to configure paperclip for dropbox. I used a yaml file to set my credentials.
I was able to upload to dropbox just fine, but when I tried to display my image with .url, I got the following exception:
undefined method `[]' for #Pathname:0x007fce810b02a0
After reconfirming that I had set everything up correctly, I traced the code and discovered that error was occurring in UrlGenerator#user_id.
def user_id
@attachment_options[:dropbox_credentials][:user_id]
end
For some reason @attachment_options[:dropbox_credentials] is not a hash, but a Pathname. Since it's a Pathname [:user_id] causes an exception. If i change :dropbox_credentials to a hash in my model, @attachment_options[:dropbox_credentials] is a hash and everything works as expected.
I just installed this gem and followed the readme me to configure paperclip for dropbox. I used a yaml file to set my credentials.
I was able to upload to dropbox just fine, but when I tried to display my image with .url, I got the following exception:
undefined method `[]' for #Pathname:0x007fce810b02a0
After reconfirming that I had set everything up correctly, I traced the code and discovered that error was occurring in UrlGenerator#user_id.
For some reason @attachment_options[:dropbox_credentials] is not a hash, but a Pathname. Since it's a Pathname [:user_id] causes an exception. If i change :dropbox_credentials to a hash in my model, @attachment_options[:dropbox_credentials] is a hash and everything works as expected.
My system configuration is:
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin14.0]
Rails 4.1.1
paperclip (4.2.1)
paperclip-dropbox (1.3.0)
The text was updated successfully, but these errors were encountered: