Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issues serving Jekyll to localhost, eventmachine 1.2.7 has an error when installing

Not sure what to do to specifically fix this problem, googled and nothing solved my question. When I try to:

bundle exec jekyll serve

I get told:

Could not find eventmachine-1.2.7 in any of the sources
Run `bundle install` to install missing gems.

Then I:

bundle install

Only to get this:

Installing eventmachine 1.2.7 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /private/var/folders/7f/2c2swwc1153899dmr8781_x40000gn/T/bundler20201130-34411-1lzt2fceventmachine-1.2.7/gems/eventmachine-1.2.7/ext
/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
./siteconf20201130-34411-pd54nh.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 /var/folders/7f/2c2swwc1153899dmr8781_x40000gn/T/bundler20201130-34411-1lzt2fceventmachine-1.2.7/gems/eventmachine-1.2.7 for
inspection.
Results logged to
/var/folders/7f/2c2swwc1153899dmr8781_x40000gn/T/bundler20201130-34411-1lzt2fceventmachine-1.2.7/extensions/universal-darwin-20/2.6.0/eventmachine-1.2.7/gem_make.out

An error occurred while installing eventmachine (1.2.7), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '1.2.7' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  minima was resolved to 2.5.1, which depends on
    jekyll-feed was resolved to 0.13.0, which depends on
      jekyll was resolved to 4.0.0, which depends on
        em-websocket was resolved to 0.5.1, which depends on
          eventmachine

Where am I going wrong here? Just updated to macOS 11.0.1, this is my first time trying to serve jekyll since the update. Thanks y'all!

like image 609
timoweaver Avatar asked Nov 30 '20 14:11

timoweaver


1 Answers

Just try:

gem install eventmachine -v '1.2.7' -- --with-cppflags=-I/usr/local/opt/openssl/include
like image 126
ivanz Avatar answered Sep 30 '22 12:09

ivanz