PG_T
@PG_T (蔵之浦 果実)

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

AWS Cloud9でrails newで一部のフォルダが作成されない

解決したいこと

AWS Cloud9でrails newを実行したのですが、一部のフォルダが作成されません。下図参照

image.png

実行環境

Rails 5.2.3(参考にしているマニュアルとバージョンを揃えるため、少し古いものを使用しています)
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]

発生している問題・エラー

rails new実行時の出力

ec2-user:~/environment $ rails new myapp
      create  
      create  README.md
      create  Rakefile
      create  .ruby-version
      create  config.ru
      create  .gitignore
      create  Gemfile
         run  git init from "."
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>
Initialized empty Git repository in /home/ec2-user/environment/myapp/.git/
      create  package.json
      create  app
      create  app/assets/config/manifest.js
      create  app/assets/javascripts/application.js
      create  app/assets/javascripts/cable.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/.keep
      create  app/assets/javascripts/channels
      create  app/assets/javascripts/channels/.keep
      create  app/controllers/concerns/.keep
      create  app/models/concerns/.keep
      create  bin
      create  bin/bundle
      create  bin/rails
      create  bin/rake
      create  bin/setup
      create  bin/update
      create  bin/yarn
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/cable.yml
      create  config/puma.rb
      create  config/spring.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/application_controller_renderer.rb
      create  config/initializers/assets.rb
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/content_security_policy.rb
      create  config/initializers/cookies_serializer.rb
      create  config/initializers/cors.rb
      create  config/initializers/filter_parameter_logging.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/new_framework_defaults_5_2.rb
      create  config/initializers/wrap_parameters.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/master.key
      append  .gitignore
/home/ec2-user/.local/share/gem/ruby/gems/activesupport-5.2.3/lib/active_support/messages/metadata.rb:17:in `wrap': wrong number of arguments (given 2, expected 1) (ArgumentError)
        from /home/ec2-user/.local/share/gem/ruby/gems/activesupport-5.2.3/lib/active_support/message_encryptor.rb:175:in `_encrypt'
        from /home/ec2-user/.local/share/gem/ruby/gems/activesupport-5.2.3/lib/active_support/message_encryptor.rb:151:in `encrypt_and_sign'
        from /home/ec2-user/.local/share/gem/ruby/gems/activesupport-5.2.3/lib/active_support/encrypted_file.rb:75:in `encrypt'
        from /home/ec2-user/.local/share/gem/ruby/gems/activesupport-5.2.3/lib/active_support/encrypted_file.rb:49:in `write'
        from /home/ec2-user/.local/share/gem/ruby/gems/activesupport-5.2.3/lib/active_support/encrypted_configuration.rb:29:in `write'
        from /home/ec2-user/.local/share/gem/ruby/gems/railties-5.2.3/lib/rails/generators/rails/credentials/credentials_generator.rb:31:in `add_credentials_file_silently'
        from /home/ec2-user/.local/share/gem/ruby/gems/railties-5.2.3/lib/rails/generators/rails/app/app_generator.rb:185:in `credentials'
        from /home/ec2-user/.local/share/gem/ruby/gems/railties-5.2.3/lib/rails/generators/app_base.rb:159:in `build'
        from /home/ec2-user/.local/share/gem/ruby/gems/railties-5.2.3/lib/rails/generators/rails/app/app_generator.rb:327:in `create_credentials'
        from /home/ec2-user/.local/share/gem/ruby/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
        from /home/ec2-user/.local/share/gem/ruby/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
        from /home/ec2-user/.local/share/gem/ruby/gems/thor-1.3.0/lib/thor/invocation.rb:134:in `block in invoke_all'
        from /home/ec2-user/.local/share/gem/ruby/gems/thor-1.3.0/lib/thor/invocation.rb:134:in `each'
        from /home/ec2-user/.local/share/gem/ruby/gems/thor-1.3.0/lib/thor/invocation.rb:134:in `map'
        from /home/ec2-user/.local/share/gem/ruby/gems/thor-1.3.0/lib/thor/invocation.rb:134:in `invoke_all'
        from /home/ec2-user/.local/share/gem/ruby/gems/thor-1.3.0/lib/thor/group.rb:232:in `dispatch'
        from /home/ec2-user/.local/share/gem/ruby/gems/thor-1.3.0/lib/thor/base.rb:584:in `start'
        from /home/ec2-user/.local/share/gem/ruby/gems/railties-5.2.3/lib/rails/commands/application/application_command.rb:26:in `perform'
        from /home/ec2-user/.local/share/gem/ruby/gems/thor-1.3.0/lib/thor/command.rb:28:in `run'
        from /home/ec2-user/.local/share/gem/ruby/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command'
        from /home/ec2-user/.local/share/gem/ruby/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch'
        from /home/ec2-user/.local/share/gem/ruby/gems/railties-5.2.3/lib/rails/command/base.rb:65:in `perform'
        from /home/ec2-user/.local/share/gem/ruby/gems/railties-5.2.3/lib/rails/command.rb:46:in `invoke'
        from /home/ec2-user/.local/share/gem/ruby/gems/railties-5.2.3/lib/rails/cli.rb:18:in `<top (required)>'
        from <internal:/usr/share/ruby3.2-rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from <internal:/usr/share/ruby3.2-rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
        from /home/ec2-user/.local/share/gem/ruby/gems/railties-5.2.3/exe/rails:10:in `<top (required)>'
        from /home/ec2-user/bin/rails:25:in `load'
        from /home/ec2-user/bin/rails:25:in `<main>'

以上、よろしくお願いします。

0

1Answer

Comments

  1. @PG_T

    Questioner

    ご回答ありがとうございます!
    Rubyのバージョンを下げる方向で、対処したいと思います。

Your answer might help someone💌