Railsの環境構築中ですが、下記エラーが出て前に進めません。
OS: macOS Big Sur
Ruby: 2.7.2
Rails: 6.1.3
①rbenv versions
system
- 2.7.2 (set by /Users/apple/.rbenv/version)
②sudo gem install rails -v "6.1.3"
Building native extensions. This could take a while...
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/nio4r-2.5.5/ext/nio4r
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20210227-1015-xk5n2d.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h
You might have to install separate package for the ruby development
environment, ruby-dev or ruby-devel for example.
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.6.0/gems/nio4r-2.5.5 for inspection.
Results logged to /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-20/2.6.0/nio4r-2.5.5/gem_make.out
どなたかご回答お願いします!
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2021/02/27 03:59