Report this

What is the reason for this report?

DigitalOcean and Locomotivecms

Posted on September 18, 2013

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



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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']

+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?

The config looks fine, what part doesn’t work?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.