rails new実行時のエラーを解決したい
rails new実行時、以下エラーが発生してしまいます。
koike@koikeryoutanoMacBook-Air dev % rails new blog-app 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 /Users/koike/dev/blog-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/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_0.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 create test/fixtures/.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_0.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 crass 1.0.6 Using rack 2.2.3 Using zeitwerk 2.4.2 Using websocket-extensions 0.1.5 Using marcel 1.0.1 Using mini_mime 1.1.0 Using public_suffix 4.0.6 Using bindex 0.8.1 Using thread_safe 0.3.6 Using minitest 5.14.4 Using msgpack 1.4.2 Using bundler 2.2.21 Using byebug 11.1.3 Using regexp_parser 2.1.1 Using childprocess 3.0.0 Using ffi 1.15.3 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 spring 2.1.1 Fetching sqlite3 1.4.2 Using nio4r 2.5.7 Using rack-test 1.1.0 Using builder 3.2.4 Using rack-proxy 0.7.0 Using sprockets 4.0.2 Using websocket-driver 0.7.5 Using mail 2.7.1 Using addressable 2.7.0 Using tzinfo 1.2.9 Using bootsnap 1.7.5 Using rb-inotify 0.10.1 Using sassc 2.4.0 Using selenium-webdriver 3.142.7 Using turbolinks-source 5.2.0 Using listen 3.5.1 Using puma 4.3.8 Using i18n 1.8.10 Using erubi 1.10.0 Using mini_portile2 2.5.3 Using racc 1.5.2 Using activesupport 6.0.4 Using nokogiri 1.11.7 Using spring-watcher-listen 2.0.1 Using turbolinks 5.2.1 Using rails-dom-testing 2.0.3 Using loofah 2.10.0 Using globalid 0.4.2 Using activemodel 6.0.4 Using xpath 3.2.0 Using jbuilder 2.11.2 Using webdrivers 4.6.0 Using rails-html-sanitizer 1.3.0 Using activejob 6.0.4 Using activerecord 6.0.4 Using capybara 3.35.3 Using actionview 6.0.4 Using actionpack 6.0.4 Using actioncable 6.0.4 Using activestorage 6.0.4 Using actionmailer 6.0.4 Using railties 6.0.4 Using sprockets-rails 3.2.2 Using actionmailbox 6.0.4 Using actiontext 6.0.4 Using sassc-rails 2.1.2 Using rails 6.0.4 Using webpacker 4.3.0 Using web-console 4.1.0 Using sass-rails 6.0.0 Installing sqlite3 1.4.2 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /Users/koike/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.2/ext/sqlite3 /Users/koike/.rbenv/versions/2.6.5/bin/ruby -I /Users/koike/.rbenv/versions/2.6.5/lib/ruby/2.6.0 -r ./siteconf20210627-66223-1j8hui1.rb extconf.rb checking for sqlite3.h... yes checking for pthread_create() in -lpthread... yes checking for -ldl... yes checking for sqlite3_libversion_number() in -lsqlite3... no sqlite3 is missing. Try 'brew install sqlite3', 'yum install sqlite-devel' or 'apt-get install libsqlite3-dev' and check your shared library search path (the location where your sqlite3 shared library is located). *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir To see why this extension failed to compile, please check the mkmf.log which can be found here: /Users/koike/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/-darwin-20/2.6.0/sqlite3-1.4.2/mkmf.log extconf failed, exit code 1 Gem files will remain installed in /Users/koike/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sqlite3-1.4.2 for inspection. Results logged to /Users/koike/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/extensions/-darwin-20/2.6.0/sqlite3-1.4.2/gem_make.out An error occurred while installing sqlite3 (1.4.2), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/'` succeeds before bundling. In Gemfile: sqlite3 run bundle binstubs bundler Could not find gem 'sqlite3 (~> 1.4)' in rubygems repository https://rubygems.org/ or installed locally. The source does not contain any versions of 'sqlite3' run bundle exec spring binstub --all Could not find gem 'sqlite3 (~> 1.4)' in rubygems repository https://rubygems.org/ or installed locally. The source does not contain any versions of 'sqlite3' Run `bundle install` to install missing gems. rails webpacker:install Could not find gem 'sqlite3 (~> 1.4)' in rubygems repository https://rubygems.org/ or installed locally. The source does not contain any versions of 'sqlite3' Run `bundle install` to install missing gems.
ログに記載のbrew install sqlite3を実施しましたが、インストール済となっており、
その後にrails newを実施しても同様のエラーが発生します。
大変お手数ですが、解決の糸口についてご教示いただけないでしょうか。
また、必要そうな情報を以下URLに記載しました。
よければ参照ください。
https://gist.github.com/chemicalist11/456cc96017c1f7735cdd60c8f5ca12b4
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details.
これは試しましたか
ご確認ありがとうございます。
mkmf.logを見ましたが、まだ解決できていません。
以下にlog内容を記載しましたが、何か分かりませんでしょうか。
https://gist.github.com/chemicalist11/b6b286f0c9ae622b6e9a5f6b2d68f3b7
これで全部ですか?
最後に成功とか失敗とか出るのではないかと思うのですが
回答1件
あなたの回答
tips
プレビュー