前提・実現したいこと
ProgateでRuby on Rails について学習をし、自分のPCにも開発環境を整えたいと考えております。
発生している問題・エラーメッセージ
rubyやrailsはProgateで記されたように進めていくことでインストールできております。
terminal
1$ rails new sample_app
を行うと
terminal
1 create 2 create README.md 3 create Rakefile 4 create .ruby-version 5 create config.ru 6 create .gitignore 7 create Gemfile 8 run git init from "." 9hint: Using 'master' as the name for the initial branch. This default branch name 10hint: is subject to change. To configure the initial branch name to use in all 11hint: of your new repositories, which will suppress this warning, call: 12hint: 13hint: git config --global init.defaultBranch <name> 14hint: 15hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and 16hint: 'development'. The just-created branch can be renamed via this command: 17hint: 18hint: git branch -m <name> 19Initialized empty Git repository in /Users/***/sample_app/.git/ 20 create package.json 21 create app 22 create app/assets/config/manifest.js 23 create app/assets/javascripts/application.js 24 create app/assets/javascripts/cable.js 25 create app/assets/stylesheets/application.css 26 create app/channels/application_cable/channel.rb 27 create app/channels/application_cable/connection.rb 28 create app/controllers/application_controller.rb 29 create app/helpers/application_helper.rb 30 create app/jobs/application_job.rb 31 create app/mailers/application_mailer.rb 32 create app/models/application_record.rb 33 create app/views/layouts/application.html.erb 34 create app/views/layouts/mailer.html.erb 35 create app/views/layouts/mailer.text.erb 36 create app/assets/images/.keep 37 create app/assets/javascripts/channels 38 create app/assets/javascripts/channels/.keep 39 create app/controllers/concerns/.keep 40 create app/models/concerns/.keep 41 create bin 42 create bin/bundle 43 create bin/rails 44 create bin/rake 45 create bin/setup 46 create bin/update 47 create bin/yarn 48 create config 49 create config/routes.rb 50 create config/application.rb 51 create config/environment.rb 52 create config/cable.yml 53 create config/puma.rb 54 create config/spring.rb 55 create config/storage.yml 56 create config/environments 57 create config/environments/development.rb 58 create config/environments/production.rb 59 create config/environments/test.rb 60 create config/initializers 61 create config/initializers/application_controller_renderer.rb 62 create config/initializers/assets.rb 63 create config/initializers/backtrace_silencers.rb 64 create config/initializers/content_security_policy.rb 65 create config/initializers/cookies_serializer.rb 66 create config/initializers/cors.rb 67 create config/initializers/filter_parameter_logging.rb 68 create config/initializers/inflections.rb 69 create config/initializers/mime_types.rb 70 create config/initializers/new_framework_defaults_5_2.rb 71 create config/initializers/wrap_parameters.rb 72 create config/locales 73 create config/locales/en.yml 74 create config/master.key 75 append .gitignore 76/Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-5.2.4.1/lib/active_support/messages/metadata.rb:17:in `wrap': wrong number of arguments (given 2, expected 1) (ArgumentError) 77 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-5.2.4.1/lib/active_support/message_encryptor.rb:175:in `_encrypt' 78 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-5.2.4.1/lib/active_support/message_encryptor.rb:151:in `encrypt_and_sign' 79 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-5.2.4.1/lib/active_support/encrypted_file.rb:75:in `encrypt' 80 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-5.2.4.1/lib/active_support/encrypted_file.rb:49:in `write' 81 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-5.2.4.1/lib/active_support/encrypted_configuration.rb:29:in `write' 82 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-5.2.4.1/lib/rails/generators/rails/credentials/credentials_generator.rb:31:in `add_credentials_file_silently' 83 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-5.2.4.1/lib/rails/generators/rails/app/app_generator.rb:185:in `credentials' 84 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-5.2.4.1/lib/rails/generators/app_base.rb:159:in `build' 85 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-5.2.4.1/lib/rails/generators/rails/app/app_generator.rb:328:in `create_credentials' 86 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run' 87 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command' 88 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `block in invoke_all' 89 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `each' 90 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `map' 91 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `invoke_all' 92 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/group.rb:232:in `dispatch' 93 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start' 94 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-5.2.4.1/lib/rails/commands/application/application_command.rb:26:in `perform' 95 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run' 96 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command' 97 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch' 98 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-5.2.4.1/lib/rails/command/base.rb:69:in `perform' 99 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-5.2.4.1/lib/rails/command.rb:46:in `invoke' 100 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-5.2.4.1/lib/rails/cli.rb:18:in `<top (required)>' 101 from <internal:/Users/***/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' 102 from <internal:/Users/***/.rbenv/versions/3.0.0/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require' 103 from /Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/railties-5.2.4.1/exe/rails:10:in `<top (required)>' 104 from /Users/***/.rbenv/versions/3.0.0/bin/rails:23:in `load' 105 from /Users/***/.rbenv/versions/3.0.0/bin/rails:23:in `<main>' 106
これは成功している?と思います。しかし
terminal
1$ rails s
を行うと
bin/rails:3:in `require_relative': cannot load such file --/Users/*****/sample_app/config/boot (LoadError) from bin/rails:3:in `<main>'
と表示されます。
試したこと
bootというファイルがロードできていないと表示されている?ため、bootのファイルを確認しようとしたのですが、configの中にはbootは存在しなかったです。これが問題なのかと考えgemfileで
gem 'boot'
と追加し、bundle install を行ってみましたが特に変化はなかったです。
有識者の方、ぜひご教授お願い致します。
補足情報(FW/ツールのバージョンなど)
rubyは3.0.0を使っております。
>Progateで記されたように進めていくことでインストールできております。
テラテイルには、Progateに従った結果、失敗している人でいっぱいです。
rails newが成功した証拠を質問文に掲載してください。
ご指摘ありがとうございます。
追記させていただきました。
ご確認お願い致します。
rails s はどのdirで実行しましたか
ご回答ありがとうございます。
sample_appのdirで行いました。
create config/master.key
append .gitignore
/Users/***/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/activesupport-5.2.4.1/lib/active_support/messages/metadata.rb:17:in `wrap': wrong number of arguments (given 2, expected 1) (ArgumentError)
途中からエラーになってます。
ありがとうございます。確認してみます!
どうしたら改善するか教えていただけますか?
>Progateで記されたように進めていくことでインストールできております。
Progateに従った結果動かないのであれば、ProgateのQAコーナーに相談してみてください。
あなたがどんな環境でどのような作業をしたのかこちらには全くわかりませんので。
あなたの回答
tips
プレビュー