Herokuは良いねー。ってことで、やってみた事のメモね!
heroku create 公開アプリ名
heroku create 公開アプリ名 --stack cedar
group :production, :staging do gem 'sqlite3-ruby', :require => 'sqlite3' gem 'pg' end group :development, :test do gem 'sqlite3' end
bundle install --without production
heroku config:add RACK_ENV=production heroku keys:add "C:\Documents and Settings\ここはあなたのユーザ名ね!\.ssh\id_rsa.pub" git remote rm heroku git remote add heroku メモしたgit名(git@heroku.com:******.git) git push heroku master
heroku keys:add /home/ここはあなたのユーザ名ね!/.ssh/id_rsa.pub heroku rake db:migrate
heroku run rake db:migrate
heroku rake db:reset
heroku restart APP名
heroku maintenance:on heroku maintenance:off
heroku config:add MAINTENANCE_PAGE_URL=http://どっか他のサーバ/メンテ画面.html
PLATFORMS x86-mingw32
heroku console >> ENV['DATABASE_URL'] => "postgres://username:password@hostname/database"
gem install taps
heroku db:pull sqlite://dump.sqlite3 --app アプリ名 heroku db:push sqlite://db/data.sqlite3 --app アプリ名
heroku addons:add mailgun:starter
# Mailgun用設定 config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { :port => ENV['MAILGUN_SMTP_PORT'], :address => ENV['MAILGUN_SMTP_SERVER'], :user_name => ENV['MAILGUN_SMTP_LOGIN'], :password => ENV['MAILGUN_SMTP_PASSWORD'], :domain => '自分のアプリのドメイン名ね!', :authentication => :plain }
heroku addons:add scheduler:standard --app アプリ名
# lib/tasks/scheduler.rake desc "This task is called by the Heroku scheduler add-on" task :create_sample => :environment do puts "fakestarbaby" end
bundle exec rake create_sample
heroku info --app アプリ名