Skip to content

Instantly share code, notes, and snippets.

@croaky
Forked from michaeldauria/gist:2048022
Created March 16, 2012 05:43
Show Gist options
  • Save croaky/2048706 to your computer and use it in GitHub Desktop.
Save croaky/2048706 to your computer and use it in GitHub Desktop.
Migrate from Copycopter 1.0 (hosted by thoughtbot) to Copycopter 2.0 (open source, deploy your own instance)

Use the latest version of the copycopter_client gem:

gem 'copycopter_client', '2.0.0'

Export your published drafts from copycopter.com:

RAILS_ENV=production bundle exec rake copycopter:export

This will create a config/locales/copycopter.yml file.

Get the newly open-sourced Copycopter Server:

git clone [email protected]:copycopter/copycopter-server.git
cd copycopter-server

Deploy your own instance of Copycopter Server. Instructions for deploying to Heroku are here.

Create a project on your newly deployed Copycopter Server:

rake copycopter:project NAME=Crowdtap USERNAME=Copy PASSWORD=Copter

Back in your Rails app, update config/initializers/copycopter.rb to point to your Copycopter Server instance. Includes the API key and host at a minimum:

CopycopterClient.configure do |config|
  config.api_key = 'API_KEY'
  config.host = 'copycopter.mydomain.com'
end

Run your app in development mode. Refresh a page. You'll see a message like this in your log:

** [Copycopter] [P:70539] [T:70171207406360] Uploaded missing translations

Stop your app and publish all keys:

bundle exec rake copycopter:deploy

Double check that all keys exist on your new Copycopter Server instance.

Delete the config/locales/copycopter.yml. This ensures that your tests will pass if they depend the default values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment