LoginSignup
0
0

More than 3 years have passed since last update.

Rails6 のちょい足しな新機能を試す 124(eager loading bug fix編)

Posted at

はじめに

Rails 6 に追加された新機能を試す第124段。 今回は、eager loading bug fix 編です。
Rails 6.0.0 では、 app ディレクトリの下にファイルを置くと rails server を実行した時に エラーになるというバグがありました。

この事象は、Ubuntu などでは発生しますが、MacOS/X では発生しないようです。

Rails 6.0.1 以降では修正されています。

Ruby 2.6.5, Rails 6.0.2.1, 6.0.1, Rails 6.0.0 で確認しました。(6.0.1で修正が入ってます。)

$ rails --version
Rails 6.0.1

今回は、 rails new して、 app ディレクトリの下にファイルを作って確認してみます。

Rails プロジェクトを作る

Rails プロジェクトを新たに作成します。

$ rails new rails_sandbox
$ cd rails_sandbox

app の下にファイルを作成する

touch コマンドでapp の下にファイルを作成します。

touch app/file.txt

Rails 6.0.1 では

Rails 6.0.1 では、 rails server してもエラーになりません。

Rails 6.0.0 では

Rails 6.0.0 では、エラーになります。

$ rails server
...
         1: from /usr/local/bundle/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:200:in `new'
         /usr/local/bundle/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:200:in `initialize': Not a directory @ dir_initialize - /app/app/file.txt (Errno::ENOTDIR)

試したソース

参考情報

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