質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

3132閲覧

railsのコマンドが使えない

cheen

総合スコア1

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2021/06/07 08:39

編集2021/06/08 00:01

前提・実現したいこと

rails s
でrailsサーバーを立ち上げたい

発生している問題・エラーメッセージ

/Users/name/rails_tutorial のディレクトリで
rails new sample_app と打つと

(base) cheen:rails new sample_app create create README.md …(文字数の関係で割愛) Fetching gem metadata from https://rubygems.org/............ Resolving dependencies.... Using rake 13.0.3 …(文字数の関係で割愛) --- ERROR REPORT TEMPLATE ------------------------------------------------------- # Error Report ## Questions Please fill out answers to these questions, it'll help us figure out why things are going wrong. - **What did you do?** I ran the command `/Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/exe/bundle install` - **What did you expect to happen?** I expected Bundler to... - **What happened instead?** Instead, what happened was... - **Have you tried any solutions posted on similar issues in our issue tracker, stack overflow, or google?** I tried... - **Have you read our issues document, https://github.com/rubygems/rubygems/blob/master/bundler/doc/contributing/ISSUES.md?** ... ## Backtrace `` Errno::EACCES: Permission denied @ dir_s_mkdir - /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-20/2.6.0/bindex-0.8.1 /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/fileutils.rb:239:in `mkdir' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/fileutils.rb:239:in `fu_mkdir' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/fileutils.rb:217:in `block (2 levels) in mkdir_p' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/fileutils.rb:215:in `reverse_each' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/fileutils.rb:215:in `block in mkdir_p' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/fileutils.rb:200:in `each' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/fileutils.rb:200:in `mkdir_p' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/ext/builder.rb:241:in `write_gem_make_out' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/ext/builder.rb:142:in `build_error' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/ext/builder.rb:201:in `rescue in build_extension' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/ext/builder.rb:178:in `build_extension' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/ext/builder.rb:229:in `block in build_extensions' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in `each' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/ext/builder.rb:226:in `build_extensions' /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/rubygems/installer.rb:830:in `build_extensions' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/rubygems_gem_installer.rb:64:in `build_extensions' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/rubygems_gem_installer.rb:26:in `install' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/source/rubygems.rb:176:in `install' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/installer/gem_installer.rb:67:in `install' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/installer/gem_installer.rb:18:in `install_from_spec' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/installer/parallel_installer.rb:186:in `do_install' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/installer/parallel_installer.rb:177:in `block in worker_pool' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/worker.rb:62:in `apply_func' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/worker.rb:57:in `block in process_queue' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/worker.rb:54:in `loop' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/worker.rb:54:in `process_queue' /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bundler-2.2.19/lib/bundler/worker.rb:88:in `block (2 levels) in create_threads' `` ## Environment `` Bundler 2.2.19 Platforms ruby, x86_64-darwin-20 Ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin20] Full Path /Users/name/.rbenv/versions/2.6.5/bin/ruby Config Dir /Users/name/.rbenv/versions/2.6.5/etc RubyGems 3.0.3 Gem Home /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0 Gem Path /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0:/Users/name/.gem/ruby/2.6.0 User Home /Users/name User Path /Users/name/.gem/ruby/2.6.0 Bin Dir /Users/name/.rbenv/versions/2.6.5/bin OpenSSL Compiled OpenSSL 1.1.1i 8 Dec 2020 Loaded OpenSSL 1.1.1i 8 Dec 2020 Cert File /usr/local/etc/openssl@1.1/cert.pem Cert Dir /usr/local/etc/openssl@1.1/certs Tools Git 2.24.3 (Apple Git-128) RVM not installed rbenv rbenv 1.1.2 chruby not installed `` ## Bundler Build Metadata `` Built At 2021-05-31 Git SHA 43f80b12c0 Released Version true `` ## Bundler settings `` ignore_messages Set via BUNDLE_IGNORE_MESSAGES: true `` ## Gemfile ### Gemfile ``ruby source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '2.6.5' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main' gem 'rails', '~> 6.1.3', '>= 6.1.3.2' # Use sqlite3 as the database for Active Record gem 'sqlite3', '~> 1.4' # Use Puma as the app server gem 'puma', '~> 5.0' # Use SCSS for stylesheets gem 'sass-rails', '>= 6' # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker gem 'webpacker', '~> 5.0' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.7' # Use Redis adapter to run Action Cable in production # gem 'redis', '~> 4.0' # Use Active Model has_secure_password # gem 'bcrypt', '~> 3.1.7' # Use Active Storage variant # gem 'image_processing', '~> 1.2' # Reduces boot times through caching; required in config/boot.rb gem 'bootsnap', '>= 1.4.4', require: false group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] end group :development do # Access an interactive console on exception pages or by calling 'console' anywhere in the code. gem 'web-console', '>= 4.1.0' # Display performance information such as SQL time and flame graphs for each request in your browser. # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md gem 'rack-mini-profiler', '~> 2.0' gem 'listen', '~> 3.3' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' end group :test do # Adds support for Capybara system testing and selenium driver gem 'capybara', '>= 3.26' gem 'selenium-webdriver' # Easy installation and use of web drivers to run system tests with browsers gem 'webdrivers' end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] `` ### Gemfile.lock `` <No /Users/name/rails_tutorial/sample_app/Gemfile.lock found> `` --- TEMPLATE END ---------------------------------------------------------------- Unfortunately, an unexpected error occurred, and Bundler cannot continue. First, try this link to see if there are any existing issue reports for this error: https://github.com/rubygems/rubygems/search?q=Permission+denied+%40+dir_s_mkdir+-+%2FUsers%2Fname%2F.rbenv%2Fversions%2F2.6.5%2Flib%2Fruby%2Fgems%2F2.6.0%2Fextensions%2Fx86_64-darwin-20%2F2.6.0%2Fbindex-0.8.1&type=Issues If there aren't any reports for this error yet, please create copy and paste the report template above into a new issue. Don't forget to anonymize any private data! The new issue form is located at: https://github.com/rubygems/rubygems/issues/new?labels=Bundler&template=bundler-related-issue.md run bundle binstubs bundler Could not find gem 'puma (~> 5.0)' in rubygems repository https://rubygems.org/ or installed locally. The source does not contain any versions of 'puma' rails webpacker:install Could not find gem 'puma (~> 5.0)' in rubygems repository https://rubygems.org/ or installed locally. The source does not contain any versions of 'puma' Run `bundle install` to install missing gems.

となります。

試したこと

最初はできていたのですが、
sample_app内で
rails s
してもサーバーが立ち上がらないことから色々と調べて、
gem install sqlite3 -v '1.4.1' --source 'https://rubygems.org/'
を入力してから上記のエラー文が表示されるようになりました。(ページは消してしまいました…)

補足情報(FW/ツールのバージョンなど)

macOS
Rails 6.1.3.2
rbenv 2.6.5
ruby 2.6.5p114
足りない情報があれば載せます。
よろしくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

winterboum

2021/06/07 22:54

どこまでうまく行っているのかわからないので、Unfortunately, の前に何が出力されているのかも載せてください。 どの dir で実行したのか、も載せてください 試したこと に書かれているものもどのdirで行ったのか、が意味を持つかもしれません
cheen

2021/06/08 00:03

追加しました。 よろしくお願いします????‍♂️
winterboum

2021/06/08 00:12

どこまでは正常に進んだのかがわからない。。。 --- ERROR REPORT TEMPLATE の上の方を、 どこまでは正常に進んだのか がわかるように
cheen

2021/06/08 00:46

create 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 /Users/name/rails_tutorial/sample_app/.git/ create package.json 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/javascript/channels/consumer.js create app/javascript/channels/index.js create app/javascript/packs/application.js 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 bin/spring 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_6_1.rb create config/initializers/permissions_policy.rb create config/initializers/wrap_parameters.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_6_1.rb run bundle install Fetching gem metadata from https://rubygems.org/............ Resolving dependencies.... Using rake 13.0.3 Using concurrent-ruby 1.1.9 Using minitest 5.14.4 Using zeitwerk 2.4.2 Using builder 3.2.4 Using erubi 1.10.0 Using racc 1.5.2 Using crass 1.0.6 Using rack 2.2.3 Using nio4r 2.5.7 Using websocket-extensions 0.1.5 Using marcel 1.0.1 Using mini_mime 1.0.3 Using public_suffix 4.0.6 Fetching bindex 0.8.1 Using bundler 2.2.19 Using regexp_parser 2.1.1 Using childprocess 3.0.0 Fetching byebug 11.1.3 Fetching msgpack 1.4.2 Fetching ffi 1.15.1 Installing bindex 0.8.1 with native extensions Installing msgpack 1.4.2 with native extensions Installing byebug 11.1.3 with native extensions Installing ffi 1.15.1 with native extensions Using rb-fsevent 0.11.0 Using method_source 1.0.0 Using thor 1.1.0 Using rubyzip 2.3.0 Using tilt 2.0.10 Using semantic_range 3.0.0 Using spring 2.1.1 Fetching sqlite3 1.4.2 Installing sqlite3 1.4.2 with native extensions Using turbolinks-source 5.2.0 Using i18n 1.8.10 Using tzinfo 2.0.4 Using nokogiri 1.11.7 (x86_64-darwin) Using rack-test 1.1.0 Using websocket-driver 0.7.4 Using mail 2.7.1 Using addressable 2.7.0 Fetching puma 5.3.2 Using rack-mini-profiler 2.3.2 Using rack-proxy 0.7.0 Using sprockets 4.0.2 Installing puma 5.3.2 with native extensions Using rake 13.0.3 Using concurrent-ruby 1.1.9 Using minitest 5.14.4 Using zeitwerk 2.4.2 Using crass 1.0.6 Using rack 2.2.3 Using nio4r 2.5.7 Using websocket-extensions 0.1.5 Using marcel 1.0.1 Using mini_mime 1.0.3 Using racc 1.5.2 Using erubi 1.10.0 Using builder 3.2.4 Using bundler 2.2.19 Using public_suffix 4.0.6 Using regexp_parser 2.1.1 Fetching msgpack 1.4.2 Fetching bindex 0.8.1 Using childprocess 3.0.0 Fetching byebug 11.1.3 Fetching ffi 1.15.1 Installing bindex 0.8.1 with native extensions Installing byebug 11.1.3 with native extensions Installing msgpack 1.4.2 with native extensions Installing ffi 1.15.1 with native extensions Using rb-fsevent 0.11.0 Using method_source 1.0.0 Using thor 1.1.0 Using rubyzip 2.3.0 Using tilt 2.0.10 Using semantic_range 3.0.0 Using spring 2.1.1 Fetching sqlite3 1.4.2 Installing sqlite3 1.4.2 with native extensions Using turbolinks-source 5.2.0 Using i18n 1.8.10 Using tzinfo 2.0.4 Using nokogiri 1.11.7 (x86_64-darwin) Using rack-test 1.1.0 Using websocket-driver 0.7.4 Using mail 2.7.1 Fetching puma 5.3.2 Using rack-mini-profiler 2.3.2 Using rack-proxy 0.7.0 Using sprockets 4.0.2 Using addressable 2.7.0 Installing puma 5.3.2 with native extensions
cheen

2021/06/08 00:47

本文の方には文字数の関係で追加できなかったのでこちらに書きます。 --- ERROR REPORT TEMPLATE の上はこうなっています????‍♂️
winterboum

2021/06/08 03:48

ということは、railsの一式は展開できて、次のbundle installでこけてるってことですね
guest

回答1

0

ベストアンサー

Permission denied @ dir_s_mkdir - /Users/name/.....
とあります。
この name と言うのは
「実際は cheen さんのlogin名なのだが、それを見せたくないので編集している」
のでしょうか、それとも login名とはことなり、'name' そのものでしょうか。

/User/naame のdirに書き込み権がないと言われているので、
実行した login名、/User/name の name部分 の確認と、そこに login者が書き込み権あるか、を確認してください

投稿2021/06/08 03:52

winterboum

総合スコア23329

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

cheen

2021/06/08 05:48

nameは編集しています。実際は私のログイン名です。 確認するにはどうすればいいのでしょうか。
winterboum

2021/06/08 08:05

ls -l /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-20/2.6.0 ls -l /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-20/2.6.0/bindex-0.8.1 の結果をみたいです
cheen

2021/06/08 08:12

(base) cheen:ls -l /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-20/2.6.0 total 0 drwxr-xr-x 6 root staff 192 6 5 14:08 nio4r-2.5.7 drwxr-xr-x 6 root staff 192 6 5 14:08 racc-1.5.2 drwxr-xr-x 6 root staff 192 6 7 16:26 sqlite3-1.4.1 drwxr-xr-x 5 root staff 160 6 5 14:08 websocket-driver-0.7.4 (base) cheen:ls -l /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-20/2.6.0/bindex-0.8.1 ls: /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-20/2.6.0/bindex-0.8.1: No such file or directory こう表示されました。
winterboum

2021/06/08 08:14

ここ rootが持ち主になってますね。どうしてこなったかわかりませんが、とりあえずの回避作として、 sudo chown -R name /Users/name/.rbenv
cheen

2021/06/08 10:30

/Users/name/rails_tutorial で実行して大丈夫ですか?
winterboum

2021/06/08 10:58

「で」の意味が不明です。pwd がそこであるときに といういみなら大丈夫です
cheen

2021/06/08 11:15

rails new sample_app は通りました。 サーバーは立ち上がりません。
winterboum

2021/06/08 11:19

どのdirで、どういうcommandを打って、どういうメッセージがでましたか
cheen

2021/06/08 11:29

(base) cheen:pwd /Users/name/rails_tutorial (base) cheen:rails s Usage: rails new APP_PATH [options] Options: [--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated engines) [--skip-collision-check], [--no-skip-collision-check] # Skip collision check -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: /Users/name/.rbenv/versions/2.6.5/bin/ruby -m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL) -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) # Default: sqlite3 [--skip-gemfile], [--no-skip-gemfile] # Don't create a Gemfile -G, [--skip-git], [--no-skip-git] # Skip .gitignore file [--skip-keeps], [--no-skip-keeps] # Skip source control .keep files -M, [--skip-action-mailer], [--no-skip-action-mailer] # Skip Action Mailer files [--skip-action-mailbox], [--no-skip-action-mailbox] # Skip Action Mailbox gem [--skip-action-text], [--no-skip-action-text] # Skip Action Text gem -O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files [--skip-active-job], [--no-skip-active-job] # Skip Active Job [--skip-active-storage], [--no-skip-active-storage] # Skip Active Storage files -P, [--skip-puma], [--no-skip-puma] # Skip Puma related files -C, [--skip-action-cable], [--no-skip-action-cable] # Skip Action Cable files -S, [--skip-sprockets], [--no-skip-sprockets] # Skip Sprockets files [--skip-spring], [--no-skip-spring] # Don't install Spring application preloader [--skip-listen], [--no-skip-listen] # Don't generate configuration that depends on the listen gem -J, [--skip-javascript], [--no-skip-javascript] # Skip JavaScript files [--skip-turbolinks], [--no-skip-turbolinks] # Skip turbolinks gem [--skip-jbuilder], [--no-skip-jbuilder] # Skip jbuilder gem -T, [--skip-test], [--no-skip-test] # Skip test files [--skip-system-test], [--no-skip-system-test] # Skip system test files [--skip-bootsnap], [--no-skip-bootsnap] # Skip bootsnap gem [--dev], [--no-dev] # Set up the application with Gemfile pointing to your Rails checkout [--edge], [--no-edge] # Set up the application with Gemfile pointing to Rails repository [--master], [--no-master] # Set up the application with Gemfile pointing to Rails repository main branch [--rc=RC] # Path to file containing extra configuration options for rails command [--no-rc], [--no-no-rc] # Skip loading of extra configuration options from .railsrc file [--api], [--no-api] # Preconfigure smaller stack for API only apps [--minimal], [--no-minimal] # Preconfigure a minimal rails app -B, [--skip-bundle], [--no-skip-bundle] # Don't run bundle install --webpacker, [--webpack=WEBPACK] # Preconfigure Webpack with a particular framework (options: react, vue, angular, elm, stimulus) [--skip-webpack-install], [--no-skip-webpack-install] # Don't run Webpack install Runtime options: -f, [--force] # Overwrite files that already exist -p, [--pretend], [--no-pretend] # Run but do not make any changes -q, [--quiet], [--no-quiet] # Suppress status output -s, [--skip], [--no-skip] # Skip files that already exist Rails options: -h, [--help], [--no-help] # Show this help message and quit -v, [--version], [--no-version] # Show Rails version number and quit Description: The 'rails new' command creates a new Rails application with a default directory structure and configuration at the path you specify. You can specify extra command-line arguments to be used every time 'rails new' runs in the .railsrc configuration file in your home directory, or in $XDG_CONFIG_HOME/rails/railsrc if XDG_CONFIG_HOME is set. Note that the arguments specified in the .railsrc file don't affect the defaults values shown above in this help message. Example: rails new ~/Code/Ruby/weblog This generates a skeletal Rails installation in ~/Code/Ruby/weblog. です。よろしくお願いします????‍♂️
winterboum

2021/06/08 11:42

rails new sample_app を実行したのが /Users/name/rails_tutorial なら /Users/name/rails_tutorial/sample_app が出来ているので、そこに cd して rails s
cheen

2021/06/08 13:44

エラーを吐きました。 エラー分が長かったので、それっぽいところを何点か書きます。 よろしくお願いします。 ~~~~~~~~~~~~~~ /Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/psych.rb:576:in `load_file': unknown keyword: aliases (ArgumentError) ~~~~~~~~~~~~~~ /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/compile_cache/yaml.rb:119:in `realpath': No such file or directory @ realpath_rec - /Users/name/rails_tutorial/sample_app/config/webpacker.yml (Errno::ENOENT) ~~~~~~~~~~~~~~ /Users/name/rails_tutorial/sample_app/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ realpath_rec - /Users/name/rails_tutorial/sample_app/config/webpacker.yml (RuntimeError) 足りなければ教えてください。
winterboum

2021/06/08 20:58

yarn と webpack のinstallはしましたか?
cheen

2021/06/08 23:28

していません。 インストールしてからもう一度やってみます!
winterboum

2021/06/08 23:46

インストールし直しはしないで大丈夫です。 私もこのあたりは手順暗記していないので検索しながらやってます。 OSにもよるので、yarn install とか webpack install でしらべてください
cheen

2021/06/10 02:49 編集

同じエラーが出ました。
cheen

2021/06/10 02:50

/Users/name/.rbenv/versions/2.6.5/lib/ruby/2.6.0/psych.rb:576:in `load_file': unknown keyword: aliases (ArgumentError) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/name/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/bootsnap-1.7.5/lib/bootsnap/compile_cache/yaml.rb:119:in `realpath': No such file or directory @ realpath_rec - /Users/name/rails_tutorial/sample_app/config/webpacker.yml (Errno::ENOENT) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Webpacker configuration file not found /Users/name/rails_tutorial/sample_app/config/webpacker.yml. Please run rails webpacker:install Error: No such file or directory @ realpath_rec - /Users/name/rails_tutorial/sample_app/config/webpacker.yml (RuntimeError)
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問