3

i'm stuck authenticating to the europe rackspace cloud with paperclip and fog. i also added this line to the credentials:

:rackspace_auth_url => "lon.auth.api.rackspacecloud.com"

but this doesnt change anything. it still tries to authenticate with the us cloud.

has anyone got this up and running?

thanks in advance!

Oliver
  • 801
  • 13
  • 26

1 Answers1

4

I have this setup working with the EU rackspace. Add the following to one of your environment files. Or configure it on a per model basis.

config.paperclip_defaults = {
  :storage          => :fog,
  :fog_directory    => 'uploaded_images',
  :fog_public       => true,
  :fog_credentials  => {
    :provider           => 'Rackspace',
    :rackspace_username => 'username',
    :rackspace_api_key  => 'key',
    :rackspace_auth_url => 'lon.auth.api.rackspacecloud.com'
  }
}

One thing to note is that the urls are double encoded when using the paperclip url method so you will need to do something like this in your view:

user.avatar.url(:thumb, { :escape => false })
JamieD
  • 2,707
  • 2
  • 20
  • 19