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!
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?
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.