简体   繁体   中英

Rackspace as cloud storage

I am trying to set up rack space for cloud storage using carrier-wave for image uploads. From all the documentation i can find it seems like i need an initializer file. Something like this

CarrierWave.configure do |config|
config.fog_credentials = {
:provider           => 'Rackspace',
:rackspace_username => 'xxxxxx',
:rackspace_api_key  => 'yyyyyy',
:rackspace_region   => :ord                # optional, defaults to :dfw
}
config.fog_directory = 'name_of_directory'
end

My question is where do i put these settings within a rails application?

The rails convention is to put such files in config/initializers. See http://guides.rubyonrails.org/configuring.html#using-initializer-files

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM