therubyracer のインストールが必要になった
- Gemfile に therubyracer の追加が必要になった
- もともと非 API モードで
$ rails new
をした時には下記の記述があるのでコメントアウトを外すだけ
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
$ sudo yum install gcc--c++
Heroku 上で動作させるときに assets のコンパイルを有効にする必要がある
# config/environments/production.rb
# Do not fallback to assets pipeline if a precompiled asset is missed.
- config.assets.compile = false
+ config.assets.compile = true
Root Path 用の index.html が必要
- Local 環境では問題ないが Production 環境では ActionController::RoutingError が発生する
- public/index.html を配置する必要がある
CSRF 対策が有効になるので必要に応じて制限を解除する
- 部分的に無効にしたい場合は、対象のコントローラファイルに下記を追記
# callback メソッドへリクエストに対して CSRF 対策を無効にする場合
protect_from_forgery :except => ["callback"]