@テク野路ジーロード

配信タグシェアリングシステムpickvyを開発、運営開始。最近は、Googleアナリティクスを研究中

Rails: Turbolinkをオフにする

もうすぐ春。花粉症もあいまって、毎日がふわふわなsunday150です。

 

Railsの挙動がおかしい!なぜか、以下のエラーが出てたり、変なエラーが
出まくる。なんで?なーんで?なんでぇぇぇぇ!?

I, [2016-03-19T23:51:48.752338 #26378]  INFO -- : Completed 500 Internal Server Error in 11ms (ActiveRecord: 0.0ms)
F, [2016-03-19T23:51:48.753273 #26378] FATAL -- :
NoMethodError (undefined method `delete' for true:TrueClass):
  turbolinks (2.5.3) lib/turbolinks/cookies.rb:9:in `set_request_method_cookie'
  activesupport (4.2.5) lib/active_support/callbacks.rb:432:in `block in make_lambda'
  activesupport (4.2.5) lib/active_support/callbacks.rb:164:in `call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:164:in `block in halting'
  activesupport (4.2.5) lib/active_support/callbacks.rb:504:in `call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:504:in `block in call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:504:in `each'
  activesupport (4.2.5) lib/active_support/callbacks.rb:504:in `call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
  activesupport (4.2.5) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
  activesupport (4.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.5) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
  activesupport (4.2.5) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.5) lib/active_support/notifications.rb:164:in `instrument'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'

 

そこで調べて、結果的にturblinkをオフにすることにしました。
無意識に便利な機能なんだろうけど挙動が直感的ではないのは確か。
以下を参考に、オフったら、エラーが消えた。なんだかなー。

qiita.com