前提・実現したいこと
表題通り、rails generate controller StaticPages home help のコマンドでStaticPagesコントローラを生成したいです。
発生している問題・エラーメッセージ
コマンドを実行したところ、下記エラーメッセージが表示されコントローラの生成ができない状況です。
エラーメッセージ `start_with?': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
該当のソースコード
ソースコード /Users/endoukenta/Desktop/ポートフォリオ/sample_app/vendor/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:283:in `start_with?': incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError) from /Users/endoukenta/Desktop/ポートフォリオ/sample_app/vendor/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:283:in `block in loaded_application_features' from /Users/endoukenta/Desktop/ポートフォリオ/sample_app/vendor/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:283:in `select' from /Users/endoukenta/Desktop/ポートフォリオ/sample_app/vendor/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:283:in `loaded_application_features' from /Users/endoukenta/Desktop/ポートフォリオ/sample_app/vendor/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:119:in `ensure in preload' from /Users/endoukenta/Desktop/ポートフォリオ/sample_app/vendor/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:126:in `preload' from /Users/endoukenta/Desktop/ポートフォリオ/sample_app/vendor/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:157:in `serve' from /Users/endoukenta/Desktop/ポートフォリオ/sample_app/vendor/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:145:in `block in run' from /Users/endoukenta/Desktop/ポートフォリオ/sample_app/vendor/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `loop' from /Users/endoukenta/Desktop/ポートフォリオ/sample_app/vendor/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/application.rb:139:in `run' from /Users/endoukenta/Desktop/ポートフォリオ/sample_app/vendor/bundle/ruby/2.7.0/gems/spring-2.1.0/lib/spring/application/boot.rb:19:in `<top (required)>' from /Users/endoukenta/.rbenv/versions/2.7.3/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require' from /Users/endoukenta/.rbenv/versions/2.7.3/lib/ruby/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require' from -e:1:in `<main>'
試したこと
エラーメッセージから ASCII-8BIT と UTF-8 の文字コードの互換性がないという事は理解出来たのですが、具体的な解決方法を見つけられていません。
有識者の方にご教示頂きたく投稿いたしました。
質問サイトを初めて利用する為、質問方法、マナー、必要な情報等が足りない等ございましたらご指摘いただけると幸いです。
補足情報(FW/ツールのバージョンなど)
Rails 6.1.3.1
ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-darwin20]
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/05/06 12:51