austin
By:
austin

DigitalOcean and Locomotivecms

September 18, 2013 4k views
Wondering if anyone can help me setup locomotivecms with digital ocean. I am at the hosting point and the instructions are asking me to modify the production block in the carrierwave.rb file. Currently it is setup for AWS. What do I need to do to get digitalocean to work. CarrierWave.configure do |config| config.cache_dir = File.join(Rails.root, 'tmp', 'uploads') case Rails.env.to_sym when :development config.storage = :file config.root = File.join(Rails.root, 'public') when :production # the following configuration works for Amazon S3 config.storage = :fog config.fog_credentials = { provider: 'AWS', aws_access_key_id: ENV['S3_KEY_ID'], aws_secret_access_key: ENV['S3_SECRET_KEY'], region: ENV['S3_BUCKET_REGION'] } config.fog_directory = ENV['S3_BUCKET'] else # settings for the local filesystem config.storage = :file config.root = File.join(Rails.root, 'public') end end
7 Answers
The config looks fine, what part doesn't work?
Has this been resolved austin? I'm developing a site on Locomotive that I'd like to get on my D.O. server soon too..

+1 from me.

I get:

error => Missing required arguments: aws_access_key_id, aws_secret_access_key

When I try and push the wagon from my local machine.

I don't want to use AWS, just my DO server.
Anybody have an insight into this?

You need the production to be the same as the development block:

when :production
  config.storage = :file
  config.root = File.join(Rails.root, 'public')

(And you'll need to comment out the existing production block):

#  when :production
#    # the following configuration works for Amazon S3
#    config.storage          = :fog
#    config.fog_credentials  = {
#      provider:                 'AWS',
#      aws_access_key_id:        ENV['S3_KEY_ID'],
#      aws_secret_access_key:    ENV['S3_SECRET_KEY'],
#      region:                   ENV['S3_BUCKET_REGION']
#    }
#    config.fog_directory    = ENV['S3_BUCKET']

Have another answer? Share your knowledge.