Sha256: 7c018764fa6113c6d6351b9d64d8944b076737041e0af2c8c3796c8429919036

Contents?: true

Size: 793 Bytes

Versions: 3

Compression:

Stored size: 793 Bytes

Contents

module Bently

  class HerokuCleardb < RailsRecipe

    homepage 'https://devcenter.heroku.com/articles/cleardb#the-short-tutorial-for-ruby-on-rails-apps'

    def initialize
      warn 'heroku commands may incur charges to your account'.upcase
      modify 'Gemfile', /gem 'sqlite3'/, ""
      gem 'mysql2'
      bundle

      run 'heroku addons:add cleardb:ignite'

      todo 'Retrieve your database URL by issuing the following command:'
      todo 'heroku config | grep CLEARDB_DATABASE_URL'
      todo 'Copy the value of the CLEARDB_DATABASE_URL config variable to DATABASE_URL (using mysql2:// instead of mysql://):'
      todo "heroku config:add DATABASE_URL='mysql2://...'"
      todo 'Add and commit Gemfile, Gemfile.lock'
      todo 'heroku run rake db:migrate'
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bently-1.0.2 lib/bently/recipe/heroku-cleardb.rb
bently-1.0.1 lib/bently/recipe/heroku-cleardb.rb
bently-1.0.0 lib/bently/recipe/heroku-cleardb.rb