前提・実現したいこと
・rails serverを起動したいです。
発生している問題・エラーメッセージ
rubyとrailsをインストールしてrecipeというプロジェクトを作り、
recipeディレクトリに移動して、rails serverとすると以下の文言が出ます。
rail newの時に下記、エラーが発生しているようです。
sqlite関連の問題でしょうか?
Using loofah 2.9.0
Fetching xpath 3.2.0
Installing addressable 2.7.0
Installing xpath 3.2.0
Fetching selenium-webdriver 3.142.7
Fetching turbolinks 5.2.1
Installing turbolinks 5.2.1
Using rails-dom-testing 2.0.3
Using globalid 0.4.2
Using activemodel 6.1.3
Fetching jbuilder 2.11.2
Installing selenium-webdriver 3.142.7
Installing jbuilder 2.11.2
Using rails-html-sanitizer 1.3.0
Fetching capybara 3.35.3
Installing capybara 3.35.3
Using activejob 6.1.3
Using activerecord 6.1.3
Using actionview 6.1.3
Using actionpack 6.1.3
Using actioncable 6.1.3
Using activestorage 6.1.3
Using actionmailer 6.1.3
Using railties 6.1.3
Using sprockets-rails 3.2.2
Using actionmailbox 6.1.3
Using actiontext 6.1.3
Fetching web-console 4.1.0
Installing web-console 4.1.0
Fetching webpacker 5.2.1
Using rails 6.1.3
Installing webpacker 5.2.1
Fetching webdrivers 4.6.0
Installing webdrivers 4.6.0
Fetching bootsnap 1.7.2
Installing bootsnap 1.7.2 with native extensions
Fetching sassc 2.4.0
Fetching rb-inotify 0.10.1
Installing rb-inotify 0.10.1
Fetching listen 3.4.1
Installing sassc 2.4.0 with native extensions
Installing listen 3.4.1
Fetching sassc-rails 2.1.2
Installing sassc-rails 2.1.2
Fetching sass-rails 6.0.0
Installing sass-rails 6.0.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/Users/kotatera/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2/ext/sqlite3
/Users/kotatera/.rbenv/versions/2.5.8/bin/ruby -I
/Users/kotatera/.rbenv/versions/2.5.8/lib/ruby/site_ruby/2.5.0 -r
./siteconf20210306-4024-11b68qb.rb extconf.rb
checking for sqlite3.h... no
sqlite3.h 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
--ruby=/Users/kotatera/.rbenv/versions/2.5.8/bin/$(RUBY_BASE_NAME)
--with-sqlcipher
--without-sqlcipher
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-config
--without-sqlite3-config
--with-pkg-config
--without-pkg-config
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
To see why this extension failed to compile, please check the mkmf.log which can
be found here:
/Users/kotatera/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-19/2.5.0/sqlite3-1.4.2/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/Users/kotatera/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/gems/sqlite3-1.4.2 for
inspection.
Results logged to
/Users/kotatera/.rbenv/versions/2.5.8/lib/ruby/gems/2.5.0/extensions/x86_64-darwin-19/2.5.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> 1.4)' in rubygems repository https://rubygems.org/ or installed locally.
https://rubygems.org/ or installed locally.
The source does not contain any versions of 'sqlite3'
rails webpacker:install
Could not find gem 'sqlite3 (
The source does not contain any versions of 'sqlite3'
Run bundle install
to install missing gems.
kotatera@MacBook ~ %
### 試したこと gemfileのsqliteを1.3.13と1.4の二通りで書き換えbundleしましたが変わらず、全くわからない状況です。 どなたかご教授お願い致します。
あなたの回答
tips
プレビュー