Question: Can't install gem 'jumpstart_auth' (Screenshot posted as well)


Can't install gem 'jumpstart_auth' (Screenshot posted as well)

Answers 1
Added at 2016-12-23 20:12

Screenschot of the error in my terminal

I am trying to install the gem however it wont let me due to some error , tried reading the gem documentation but couldn't figure it out myself.Thats when I needed the help of the seasoned ones.

Building native extensions. This could take a while... ERROR: Error installing jumpstart_auth: ERROR: Failed to build gem native extension.

current directory: /var/lib/gems/2.3.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser

/usr/bin/ruby2.3 -r ./siteconf20161223-26375-4etqmc.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.3.0/gems/http_parser.rb-0.6.0 for inspection. Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/http_parser.rb-0.6.0/gem_make.out

nr: #1 dodano: 2016-12-23 21:12

This gem is trying to compile an extension that use native C code. To do that, it looks for the C header file ruby.h which is not included in the regular Ruby runtime packages found in Ubuntu.

You probably installed Ruby using your distributions package manager. In that case you also need to install the corresponding -dev package.

In case you're using Ubuntu, it should probably be:

sudo apt-get install ruby2.3-dev

But, as already commented by @Esse, using RVM or rbenv is usually the better way to go. Also, the screenshot you provided shows that you used sudo to install the gem. This should also not be necessary and is indeed bad practice. Using RVM/rbenv will also get around this.

Source Show
◀ Wstecz