sferik / twitter-ruby

A Ruby interface to the Twitter API.
http://www.rubydoc.info/gems/twitter
MIT License
4.59k stars 1.31k forks source link

Issue installing with gem #1013

Closed erlendtp1996 closed 1 year ago

erlendtp1996 commented 2 years ago

I am running gem install twitter however get the following error:

ERROR:  Error installing twitter:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/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 ./siteconf20220804-11501-7un84f.rb extconf.rb
creating Makefile

current directory: /Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.6.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
make: *** No rule to make target `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h', needed by `ruby_http_parser.o'.  Stop.

make failed, exit code 2

Has anyone ran into this issue before? I am on Ruby version 2.6.3 & gem version 3.0.3

andypiper commented 2 years ago

It looks like a generic Ruby build problem rather than something specific to this gem. Are you able to install other gems with native extensions?

Worth noting that this gem doesn't support the current version of the Twitter API (v2) at the moment, so others may be more suitable if you're creating a new app right now.