LoginSignup
26
18

More than 5 years have passed since last update.

既存のアプリのRailsのバージョンをあげた際にrails sが立ち上がらない

Last updated at Posted at 2019-03-12

Gemfileにて、gem 'rails'の後ろに何もつけないと、最新の状態のrailsがインストールされる!!

しかし、rails sをすると

<top (required)>': undefined method `halt_callback_chains_on_return_false=' for ActiveSupport:Module (NoMethodError)

と言われる。
どうやらhalt_callback_chains_on_return_falseはRails 4との後方互換のためのメソッドで、定義されていないメソッドだと言われる。
なので
config/initializers/new_framework_defaults.rbの中のhalt_callback_chains_on_return_falseをコメントアウト!!

無事、rails sでサーバーが立ち上がった!!

追記:rails sをした時にlocal:3000にて
Puma caught this error: Invalid option key: raise_on_unfiltered_parameters= (RuntimeError)

と表示されてしまったら

config/initializers/new_framework_defaults.rb

Rails.application.config.action_controller.raise_on_unfiltered_parameters = true

をコメントアウトにすると解決!!

Rails 5.1から追加された設定らしい、、、

26
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
26
18