Skip to content

Instantly share code, notes, and snippets.

@halsk
Created March 25, 2014 13:48
Show Gist options
  • Save halsk/9762166 to your computer and use it in GitHub Desktop.
Save halsk/9762166 to your computer and use it in GitHub Desktop.
Locomotive Engine を Heroku で動かすまで ref: http://qiita.com/hal_sk/items/0512a4a9cb215fb016f5
heroku config:add HEROKU_API_KEY=<YOUR HEROKU API KEY>
heroku config:add HEROKU_APP_NAME=<YOUR APP NAME>
ruby '2.0.0'
production:
sessions:
default:
uri: <%= ENV['MONGOHQ_URL'] %>
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => 'smtp.sendgrid.net',
:port => 25,
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => ENV['SENDGRID_DOMAIN']
}
config.hosting = {
:target => :heroku,
:api_key => ENV['HEROKU_API_KEY'],
:app_name => ENV['HEROKU_APP_NAME']
}
module YourApplication
class Application < Rails::Application
...
config.assets.initialize_on_precompile = false
...
end
end
bundle exec rake assets:precompile
git add .
git commit -am "launch it"
git push heroku master
gem 'locomotive-heroku', '~> 0.1.0', :require => 'locomotive/heroku'
gem 'thin', :group => 'production'
development:
sessions:
default:
database: mycms_dev
hosts:
- localhost:27017
options:
identity_map_enabled: true
test:
sessions:
default:
database: mycms_test
hosts:
- localhost:27017
options:
identity_map_enabled: true
production:
sessions:
default:
uri: <%= ENV['MONGOHQ_URL'] %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment