Help us understand the problem. What is going on with this article?

railsでもbowerでasset管理しつつherokuにもdeployする方法

More than 5 years have passed since last update.

Bowerを導入します。

node.js

$ brew upgrade node

bower-rails

$ vim Gemfile
 gem 'jbuilder', '~> 2.0'
 gem 'enumerize'
 gem 'factory_girl_rails'
+gem 'bower-rails'

 group :development, :test do
   gem 'spring'
$ rails g bower_rails:initialize

assetを追加

$ vim Bowerfile

なんか、いろいろ

asset 'reset-css'
asset 'jquery-ujs'
asset 'jquery-ui'
asset 'components-font-awesome'
$ rake bower:install

herokuにあげたい場合

$ heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-multi.git
$ vim .buildpacks
https://github.com/heroku/heroku-buildpack-nodejs
https://github.com/heroku/heroku-buildpack-ruby

heroku buttonの設置例

$ 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"
   }
 }
ppworks
最近は主にrailsです!
http://ppworks.jp
esaLLC
esa.io や pplog.net などのWebサービスを開発・デザイン・運営しています
https://team.esa.io
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした