yoonwaiyan / stackskills-dl

Simple Ruby script to download all StackSkills tutorials.
https://yoonwaiyan.github.io/stackskills-dl/
MIT License
59 stars 19 forks source link

Add Ruby header files to the prerequisites #29

Closed beerendlauwers closed 6 years ago

beerendlauwers commented 6 years ago

While running bundle install on the latest version, I get

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /tmp/bundler20170731-6771-1na1uuounf_ext-0.0.7.2/gems/unf_ext-0.0.7.2/ext/unf_ext
/usr/bin/ruby2.3 -r ./siteconf20170731-6771-14yzuwa.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 /tmp/bundler20170731-6771-1na1uuounf_ext-0.0.7.2/gems/unf_ext-0.0.7.2 for inspection.
Results logged to /tmp/bundler20170731-6771-1na1uuounf_ext-0.0.7.2/extensions/x86_64-linux/2.3.0/unf_ext-0.0.7.2/gem_make.out

Solution

Turns out you need the Ruby header files for this: https://stackoverflow.com/questions/4304438/gem-install-failed-to-build-gem-native-extension-cant-find-header-files

In Ubuntu: sudo apt-get install ruby-dev

yoonwaiyan commented 6 years ago

Closing this as this issue is related to ruby/bundler. If anyone face this problem, please refer to the solution given above or try Google the error for more possible workarounds.