Skip to content

Instantly share code, notes, and snippets.

@ppworks
Last active August 29, 2015 14:10
Show Gist options
  • Save ppworks/b4d28febac0343566162 to your computer and use it in GitHub Desktop.
Save ppworks/b4d28febac0343566162 to your computer and use it in GitHub Desktop.
railsでもbowerでasset管理しつつherokuにもdeployする方法 ref: http://qiita.com/ppworks/items/9c0e58e5ebe3f1f439eb
$ brew upgrade node
$ vim Gemfile
$ vim app.json
"repository": "https://github.com/ppworks/furikaeri",
"scripts": {
"postdeploy": "bundle exec rake db:migrate && bundle exec rake db:seed"
+ },
+ "env": {
+ "BUILDPACK_URL": "https://github.com/heroku/heroku-buildpack-multi.git"
}
}
gem 'jbuilder', '~> 2.0'
gem 'enumerize'
gem 'factory_girl_rails'
+gem 'bower-rails'
group :development, :test do
gem 'spring'
$ rails g bower_rails:initialize
$ vim Bowerfile
asset 'reset-css'
asset 'jquery-ujs'
asset 'jquery-ui'
asset 'components-font-awesome'
$ rake bower:install
$ heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-multi.git
$ vim .buildpacks
"repository": "https://github.com/ppworks/furikaeri",
"scripts": {
"postdeploy": "bundle exec rake db:migrate && bundle exec rake db:seed"
+ },
+ "env": {
+ "BUILDPACK_URL": "https://github.com/ddollar/heroku-buildpack-multi.git"
}
}
https://github.com/heroku/heroku-buildpack-nodejs
https://github.com/heroku/heroku-buildpack-ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment