Ruby on Rails初心者です。
RubyをインストールしてRailsをインストールしました。
アプリケーションを作成して、rails serverコマンドで起動しようとしたら下記のエラーが出ます。
※controllerを作成しようとしても同じエラーが出てしまいます。
C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/path.rb:100:in `start_with?': incompatible character encodings: UTF-8 and Windows-31J (Encoding::CompatibilityError) from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/path.rb:100:in `block in stability' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/path.rb:100:in `each' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/path.rb:100:in `detect' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/path.rb:100:in `stability' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/path.rb:10:in `stable?' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/path.rb:40:in `entries_and_dirs' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/cache.rb:156:in `block (2 levels) in unshift_paths_locked' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/cache.rb:153:in `reverse_each' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/cache.rb:153:in `block in unshift_paths_locked' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/store.rb:45:in `transaction' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/cache.rb:152:in `unshift_paths_locked' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/cache.rb:98:in `block in unshift_paths' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/cache.rb:98:in `synchronize' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/cache.rb:98:in `unshift_paths' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bootsnap-1.3.0/lib/bootsnap/load_path_cache/change_observer.rb:27:in `block in register' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/application.rb:331:in `add_lib_to_load_path!' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.2.0/lib/rails/application.rb:94:in `inherited'
調べたところ、UTF-8とWindows-31J(Shift-jis)という異なった文字コードの文字列が連結されて
エラーが発生しているという所まではわかったのですが、そこから先で詰まってしまい質問させていただきました。
文字コードをエディターからUTF-8などにしてみましたが、一向に変化なしです。
https://teratail.com/questions/61631 ←を参考にさせていただきました。
よろしければ、ご教授願います。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/07/03 14:25