thoughtbot/paperclip — Issue #658: s3 url creation not working
Author: corck
Created: 2011-11-30 17:21:41+00:00
State: open

I have a strange issue. I just upgraded from 2.3 to rails 3.0 and using the latest Paperclip gem

The problem is, on Rails startup or can reproduce it in the console as well, it seems the storage S3 option is ignored.
I get the URL
```ruby
ruby-1.9.3-p0 :006 > p.asset.url
"/system/assets/116/original/DSC07568.jpg?1270933446"
```
after I do a reload! in the console the url is the proper one
```ruby
ruby-1.9.3-p0 :006 > reload!
ruby-1.9.3-p0 :006 > p = Photo.last
ruby-1.9.3-p0 :006 > p.asset.url
"http://development-assets0.domain.com/development/asset/116/original_DSC07568.jpg?1270933446"
```

my model declaration
```ruby
has_attached_file :asset,
:styles => {
:original => "1024x1024>",
:medium => "267x267>",
:thumb=> "100x100#",
:small => "150x150>"
},
:storage => :s3,
:s3_credentials => "#{Rails.root}/config/s3.yml",
:bucket => BUCKET_NAME,
:path => ":rails_env/asset/:id/:style_:basename.:extension",
#:url => ":rails_env/asset/:id/:style_:basename.:extension",
:url => ':s3_alias_url',
:default_url => "/images/processing.png",
:processors => :thumbnail,
:s3_host_alias => "#{Rails.env}-assets0.domain.com"
```