2015-07-15から1日間の記事一覧

heroku runを環境ごとに実行する

http://humanwebdevelopment.com/rails-production-and-staging-environments-for-heroku/ $ heroku config:add RACK_ENV=staging RAILS_ENV=staging --remote staging $ git push production master $ heroku run rake db:migrate --remote production

origin以外のherokuの環境(staging, production, ... etc.)をつくる

http://slowquery.hatenablog.com/entry/2014/04/06/114059 heroku create newapp --remote productiongit push production master

環境にあわせてrake db:seedを実行する

http://stackoverflow.com/questions/16808471/ruby-on-rails-way-to-create-different-seeds-file-for-environments db/seeds/development.rb db/seeds/test.rb db/seeds/production.rbload(Rails.root.join( 'db', 'seeds', "#{Rails.env.downcase}.rb")) …

masterブランチ以外をherokuにプッシュする

git push heroku devすると、Pushed to non-master branch, skipping build. といわれてビルドされない。 http://stackoverflow.com/questions/14593538/make-heroku-run-non-master-git-branch https://devcenter.heroku.com/articles/multiple-environment…