This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Remember to set DROPBOX_APP_KEY, DROPBOX_APP_SECRET, DROPBOX_AUTH_KEY, DROPBOX_AUTH_SECRET. | |
# This script assumes you're using Bundler to control your dbox version. | |
# You also need to set remote_dir below. | |
require "rubygems" | |
require "bundler" | |
Bundler.setup(:default) | |
Bundler.require(:default) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First configure your models to use Amazon s3 as storage option and setup the associated S3 config. | |
# Then add the classes your want to migrate in the klasses array below. | |
# Then run rake paperclip_migration:migrate_to_s3 | |
# Should work but this is untested and may need some tweaking - but it did the job for me. | |
namespace :paperclip_migration do | |
desc "migrate files from filesystem to s3" | |
task :migrate_to_s3 => :environment do | |
# Replace with your real model names. If anyone wants to this could be picked up from args or from configuration. | |
klasses = [:account, :product, :product_category, :studio] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(sandbox) ~/src/lab (master=) % VAGRANT_LOG=debug vagrant plugin install vagrant-hosts 11:30:41 | |
Ignoring nokogiri-1.6.7.1 because its extensions are not built. Try: gem pristine nokogiri --version 1.6.7.1 | |
Ignoring unf_ext-0.0.7.2 because its extensions are not built. Try: gem pristine unf_ext --version 0.0.7.2 | |
INFO global: Vagrant version: 2.0.1 | |
INFO global: Ruby version: 2.4.2 | |
INFO global: RubyGems version: 2.6.13 | |
INFO global: VAGRANT_LOG="debug" | |
INFO global: VAGRANT_OLD_ENV_XPC_SERVICE_NAME="0" | |
INFO global: VAGRANT_OLD_ENV_OLDPWD="/Users/jason/src" | |
INFO global: VAGRANT_OLD_ENV_LANG="en_CA.UTF-8" |