AmazonのCloud9で、RubyとRailsを学習しており、VisualStudioCodeでも同じように使えるようにしたいと環境の構築から始めましたが、Rubyは問題なく出来ましたがRailsの環境構築が上手くいきません。
Rails new アプリケーション名
を実行すると以下のエラーが表示されます。
エラーの原因がRubyに起因するものなのか?そもそも、Railsのインストールに起因するのかが判りません。
他の方の似たようなエラー対処の回避方法を参考にしましたが、なお同じ状況です。
create README.md
create Rakefile
create .ruby-version
create config.ru
create .gitignore
create .gitattributes
create Gemfile
run git init from "."
Initialized empty Git repository in C:/Users/xxx/sample3/.git/
create app
create app/assets/config/manifest.js
create app/assets/stylesheets/application.css
create app/channels/application_cable/channel.rb
create app/channels/application_cable/connection.rb
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
create app/jobs/application_job.rb
create app/mailers/application_mailer.rb
create app/models/application_record.rb
create app/views/layouts/application.html.erb
create app/views/layouts/mailer.html.erb
create app/views/layouts/mailer.text.erb
create app/assets/images
create app/assets/images/.keep
create app/controllers/concerns/.keep
create app/models/concerns/.keep
create bin
create bin/rails
create bin/rake
create bin/setup
create config
create config/routes.rb
create config/application.rb
create config/environment.rb
create config/cable.yml
create config/puma.rb
create config/storage.yml
create config/environments
create config/environments/development.rb
create config/environments/production.rb
create config/environments/test.rb
create config/initializers
create config/initializers/assets.rb
create config/initializers/content_security_policy.rb
create config/initializers/cors.rb
create config/initializers/filter_parameter_logging.rb
create config/initializers/inflections.rb
create config/initializers/new_framework_defaults_7_0.rb
create config/initializers/permissions_policy.rb
create config/locales
create config/locales/en.yml
create config/master.key
append .gitignore
create config/boot.rb
create config/database.yml
create db
create db/seeds.rb
create lib
create lib/tasks
create lib/tasks/.keep
create lib/assets
create lib/assets/.keep
create log
create log/.keep
create public
create public/404.html
create public/422.html
create public/500.html
create public/apple-touch-icon-precomposed.png
create public/apple-touch-icon.png
create public/favicon.ico
create public/robots.txt
create tmp
create tmp/.keep
create tmp/pids
create tmp/pids/.keep
create tmp/cache
create tmp/cache/assets
create vendor
create vendor/.keep
create test/fixtures/files
create test/fixtures/files/.keep
create test/controllers
create test/controllers/.keep
create test/mailers
create test/mailers/.keep
create test/models
create test/models/.keep
create test/helpers
create test/helpers/.keep
create test/integration
create test/integration/.keep
create test/channels/application_cable/connection_test.rb
create test/test_helper.rb
create test/system
create test/system/.keep
create test/application_system_test_case.rb
create storage
create storage/.keep
create tmp/storage
create tmp/storage/.keep
remove config/initializers/cors.rb
remove config/initializers/new_framework_defaults_7_0.rb
run bundle install
C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `match?': invalid byte sequence in UTF-8 (ArgumentError)
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `chop_basename'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:374:in `plus'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:354:in `+'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:420:in `join'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:445:in `global_config_file'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:93:in `initialize'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `settings'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/env.rb:20:in `report'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:74:in `request_issue_report_for'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:53:in `log_error'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:126:in `rescue in with_friendly_errors'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:118:in `with_friendly_errors'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/exe/bundle:36:in `<main>'
C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `match?': invalid byte sequence in UTF-8 (ArgumentError)
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `chop_basename'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:374:in `plus'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:354:in `+'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:420:in `join'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:445:in `global_config_file'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:93:in `initialize'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `settings'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/feature_flag.rb:21:in `block in settings_method'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/cli.rb:106:in `<class:CLI>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/cli.rb:6:in `<module:Bundler>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/cli.rb:5:in `<top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/exe/bundle:38:in `require_relative'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/exe/bundle:38:in `block in <main>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/exe/bundle:36:in `<main>'
run bundle binstubs bundler
C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `match?': invalid byte sequence in UTF-8 (ArgumentError)
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `chop_basename'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:374:in `plus'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:354:in `+'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:420:in `join'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:445:in `global_config_file'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:93:in `initialize'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `settings'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/env.rb:20:in `report'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:74:in `request_issue_report_for'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:53:in `log_error'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:126:in `rescue in with_friendly_errors'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:118:in `with_friendly_errors'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/exe/bundle:36:in `<main>'
C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `match?': invalid byte sequence in UTF-8 (ArgumentError)
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `chop_basename'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:374:in `plus'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:354:in `+'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:420:in `join'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:445:in `global_config_file'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:93:in `initialize'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `settings'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/feature_flag.rb:21:in `block in settings_method'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/cli.rb:106:in `<class:CLI>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/cli.rb:6:in `<module:Bundler>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/cli.rb:5:in `<top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/exe/bundle:38:in `require_relative'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/exe/bundle:38:in `block in <main>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/exe/bundle:36:in `<main>'
rails importmap:install
C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `match?': invalid byte sequence in UTF-8 (ArgumentError)
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `chop_basename'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:374:in `plus'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:354:in `+'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:420:in `join'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:445:in `global_config_file'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:93:in `initialize'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `settings'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:111:in `configured_bundle_path'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:96:in `bundle_path'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:651:in `configure_gem_home_and_path'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:82:in `configure'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:206:in `definition'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:155:in `setup'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/setup.rb:10:in `block in <top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/ui/shell.rb:136:in `with_level'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/ui/shell.rb:88:in `silence'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/setup.rb:10:in `<top (required)>'
from <internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Users/xxx/sample3/config/boot.rb:3:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'
rails turbo:install stimulus:install
C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `match?': invalid byte sequence in UTF-8 (ArgumentError)
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:50:in `chop_basename'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:374:in `plus'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:354:in `+'
from C:/Ruby31-x64/lib/ruby/3.1.0/pathname.rb:420:in `join'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:445:in `global_config_file'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/settings.rb:93:in `initialize'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `new'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:342:in `settings'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:111:in `configured_bundle_path'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:96:in `bundle_path'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:651:in `configure_gem_home_and_path'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:82:in `configure'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:206:in `definition'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler.rb:155:in `setup'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/setup.rb:10:in `block in <top (required)>'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/ui/shell.rb:136:in `with_level'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/ui/shell.rb:88:in `silence'
from C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/bundler-2.3.26/lib/bundler/setup.rb:10:in `<top (required)>'
from <internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:C:/Ruby31-x64/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from C:/Users/xxxx/sample3/config/boot.rb:3:in `<top (required)>'
from bin/rails:3:in `require_relative'
from bin/rails:3:in `<main>'
C:\sample
などにプロジェクトを作成しようとしても同様のエラーが発生しますか?