LoginSignup
0
0

More than 3 years have passed since last update.

Padrinoで開発時のRACK_ENVを変更するなどしてVIEW(テンプレート)が再読み込みされない場合は reload_templates を enable にしてやる

Posted at

PadrinoというRailsとSinatraの中間ぐらいのRubyのフレームワークを使っているのですが、Reloader がうまく効いてくれず、コントローラーは再読み込みされるのにビューが再読み込みされなかったので調べました。

原因は RACK_ENVdevelopment_xx のように変更していたことで、
解決方法は app.rb で以下のように指定してやることです。

enable :reload_templates if RACK_ENV =~ /^development/ 

Padrino、そんなに大きくないしWebに情報がそんなにないので、ソースでそれっぽいところを読むのが最短かもしれません。

参考: http://sinatrarb.com/intro-ja.html

0
0
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
0
0