Question

DigitalOcean and Locomotivecms

  • Posted on September 18, 2013
  • austinAsked by austin

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


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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?

+1 from me.