hyperstack-org / hyperstack-org/hyperstack

wrong application_record file being read in production

オープン
#222 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug
主要言語
JavaScript
スター
538
フォーク
41
PR マージ指標
30日以内にマージされた PR はありません

説明

in production the `eager_load` setup is causing the `app/models/application_record.rb` to be required instead of `app/hyperstack/models/application_record.rb`

The issue seems that eager_load paths are searched in the order they are added to the eager_load_paths array. BUT auto_load paths (in development) are searched in the backwards order.

The simple solution is that add the hyperstack paths to the front of the eager_load path.

A work around for now is that add this line to your config/application.rb file:

`config.eager_load_paths = %W(#{config.root}/app/hyperstack/models) + config.eager_load_paths`

Or if on rails 5.2 or better just remove the `app/models/application_record.rb` file since it is no longer needed as the original rails problem that made this file has been fixed.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。