ローカル環境でtwitterのクローンを開発しています。
rails db:createを実行したところ、
rails db:create
Ignoring nio4r-2.3.1 because its extensions are not built. Try: gem pristine nio4r --version 2.3.1
Ignoring nokogiri-1.8.4 because its extensions are not built. Try: gem pristine nokogiri --version 1.8.4
Could not find gem 'rails (~> 5.2.1)' in any of the gem sources listed in your Gemfile.
Run bundle install
to install missing gems.
というエラーが発生します。
gem pristineというコマンドは実行して、Gemfileの中身の'nokogiri'もバージョンを下げ、1.8.4に書き換えた上でbundle install を実行すると、今度は
em::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/Users/kentaroyoshizumi/Downloads/docker-files/microposts/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.10.3/ext/nokogiri
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r
./siteconf20190723-1780-1y9xvhv.rb extconf.rb --use-system-libraries
mkmf.rb can't find header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in
/Users/kentaroyoshizumi/Downloads/docker-files/microposts/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.10.3
for inspection.
Results logged to
/Users/kentaroyoshizumi/Downloads/docker-files/microposts/vendor/bundle/ruby/2.3.0/extensions/universal-darwin-18/2.3.0/nokogiri-1.10.3/gem_make.out
An error occurred while installing nokogiri (1.10.3), and Bundler
cannot continue.
Make sure that gem install nokogiri -v '1.10.3' --source 'https://rubygems.org/'
succeeds before bundling.
というエラーが発生し、八方塞がりになっている状態です。
どんな解決法が考えられるでしょうか?
あなたの回答
tips
プレビュー