Install puma on ubuntu (rubinius 2.1.1) - rvm

I am trying to install puma on ubuntu 12.04 with rubinius 2.1.1 and I am getting to following error:
Building native extensions. This could take a while...
ERROR: Error installing puma:
ERROR: Failed to build gem native extension.
/home/meir/.rvm/rubies/rbx-2.1.1/bin/rbx extconf.rb
creating Makefile
make "DESTDIR="
compiling io_buffer.c
compiling http11_parser.c
compiling puma_http11.c
compiling mini_ssl.c
In file included from mini_ssl.c:3:0:
/home/meir/.rvm/rubies/rbx-2.1.1/vm/include/capi/ruby/backward/rubyio.h:1:2: warning: #warning use "ruby/io.h" instead of "rubyio.h" [-Wcpp]
linking shared-object puma/puma_http11.so
make: clang: Command not found
make: *** [puma_http11.so] Error 127
I tried to re-install the rvm, rbx, and the following libraries: libcurl4-openssl-dev, openssl, libgnutls-openssl27.
But i get the same error.
ruby -v
rubinius 2.1.1 (2.1.0 be67ed17 2013-10-18 JI) [x86_64-linux-gnu]
thanks.

I found the solution, because the ubuntu installation was 64 bit, so the libssl-dev was 64 bit, and puma gem on rubinius can't work with 64 bit openssl native extensions, so, I created another virtual machine with ubuntu 32 bit and everything works just fine.
Thanks anyway...

Related

Unable To Install 'therubyracer v0.12.3' gem in M1 Macbook Pro

I am using M1 Macbook Pro and wants to install therubyracer and libv8 for a rails webapp. But I am unable to do so because of the errors described below. There are several solutions available on the internet but none of them is working for me.
Operating System: macOS Big Sur v11.1.
It would be very helpful if someone can help me with this.
Log:
❯ ruby -v
ruby 2.5.5p157 (2019-03-15 revision 67260) [-darwin20]
❯ bundle -v
Bundler version 1.17.3
❯ brew -v
Homebrew 2.7.5
Homebrew/homebrew-core (git revision e04a30; last commit 2021-01-20)
Homebrew/homebrew-cask (git revision d128de; last commit 2021-01-20)
❯ uname -a
Darwin Vaibhavs-MacBook-Pro.local 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec 2 20:40:21 PST 2020; root:xnu-7195.60.75~1/RELEASE_ARM64_T8101 arm64
❯ brew search v8
==> Formulae
v8 ✔ v8#3.15
==> Casks
amitv87-pip
❯ brew install v8#3.15
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 3 formulae.
==> Updated Casks
Updated 3 casks.
Error: v8#3.15: no bottle available!
You can try to install from source with:
brew install --build-from-source v8#3.15
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels.
❯ brew install --build-from-source v8#3.15
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 1 cask.
==> Cloning https://chromium.googlesource.com/external/gyp.git
Updating /Users/vaibhavgupta/Library/Caches/Homebrew/v8#3.15--gyp--git
==> Checking out revision f7bc250ccc4d619a1cf238db87e5979f89ff36d7
HEAD is now at f7bc250c Make gyp/win32 compatible with upstream ninja.
HEAD is now at f7bc250c Make gyp/win32 compatible with upstream ninja.
==> Downloading https://github.com/v8/v8-git-mirror/archive/3.15.11.18.tar.gz
Already downloaded: /Users/vaibhavgupta/Library/Caches/Homebrew/downloads/26ea05158c6c6ebb67cc42075858df9a986f9c615513933b1e62bb707f707854--v8-3.15.11.18.tar.gz
==> make native -j8 library=shared snapshot=on console=readline
Last 15 lines from /Users/vaibhavgupta/Library/Logs/Homebrew/v8#3.15/01.make:
Atomic32 Acquire_Load(volatile const Atomic32* ptr);
^
In file included from ../src/conversions.cc:32:
In file included from ../src/conversions-inl.h:42:
In file included from ../src/platform.h:100:
In file included from ../src/lazy-instance.h:94:
../src/once.h:115:7: error: no matching function for call to 'Acquire_Load'
if (Acquire_Load(once) != ONCE_STATE_DONE) {
^~~~~~~~~~~~
../src/atomicops.h:125:10: note: candidate function not viable: no known conversion from 'v8::internal::OnceType *' (aka 'long *') to 'const volatile v8::internal::Atomic32 *' (aka 'const volatile int *') for 1st argument
Atomic32 Acquire_Load(volatile const Atomic32* ptr);
^
5 errors generated.
make[1]: *** [/private/tmp/v8-3.15-20210120-4211-1soh8ig/v8-3.15.11.18/out/native/obj.target/preparser_lib/src/conversions.o] Error 1
make: *** [native] Error 2
Do not report this issue to Homebrew/brew or Homebrew/core!
❯ brew install v8
==> Downloading https://homebrew.bintray.com/bottles/v8-8.8.278.14.arm64_big_sur.bottle.tar.gz
Already downloaded: /Users/vaibhavgupta/Library/Caches/Homebrew/downloads/457adba5b4da5d7cb7d6d896218ebc5d8f1453782321e97a3df424f4a4e8a821--v8-8.8.278.14.arm64_big_sur.bottle.tar.gz
==> Pouring v8-8.8.278.14.arm64_big_sur.bottle.tar.gz
🍺 /opt/homebrew/Cellar/v8/8.8.278.14: 80 files, 39.9MB
❯ brew --prefix v8
/opt/homebrew/opt/v8
❯ gem install libv8 -v '3.16.14.19'
Fetching libv8-3.16.14.19.gem
Building native extensions. This could take a while...
ERROR: Error installing libv8:
ERROR: Failed to build gem native extension.
current directory: /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/ext/libv8
/Users/vaibhavgupta/.rvm/rubies/ruby-2.5.5/bin/ruby -I /Users/vaibhavgupta/.rvm/rubies/ruby-2.5.5/lib/ruby/site_ruby/2.5.0 -r ./siteconf20210120-6051-11xeqcl.rb extconf.rb
creating Makefile
Applying /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/patches/disable-building-tests.patch
Applying /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/patches/disable-werror-on-osx.patch
Applying /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/patches/disable-xcode-debugging.patch
Applying /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/patches/do-not-imply-vfp3-and-armv7.patch
Applying /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/patches/do-not-use-MAP_NORESERVE-on-freebsd.patch
Applying /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/patches/do-not-use-vfp2.patch
Applying /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/patches/fPIC-for-static.patch
Compiling v8 for arm
Using python 2.7.16
Using compiler: c++ (clang version 12.0.0)
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher
Beginning compilation. This will take some time.
Building v8 with env CXX=c++ LINK=c++ /usr/bin/make arm.release vfp2=off vfp3=on hardfp=on ARFLAGS.target=crs werror=no
GYP_GENERATORS=make \
build/gyp/gyp --generator-output="out" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
-Dv8_target_arch=arm \
-S.arm -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=false -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3 -Dwerror='' -Dv8_use_arm_eabi_hardfloat=true
CXX(target) /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/vendor/v8/out/arm.release/obj.target/preparser_lib/src/allocation.o
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from ../src/allocation.cc:33:
../src/utils.h:33:10: fatal error: 'climits' file not found
#include <climits>
^~~~~~~~~
1 error generated.
make[1]: *** [/Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/vendor/v8/out/arm.release/obj.target/preparser_lib/src/allocation.o] Error 1
make: *** [arm.release] Error 2
/Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/vendor/v8/out/arm.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
from /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/ext/libv8/location.rb:35:in `each'
from /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/ext/libv8/location.rb:35:in `verify_installation!'
from /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/ext/libv8/location.rb:26:in `install!'
from extconf.rb:7:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19 for inspection.
Results logged to /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/extensions/-darwin-20/2.5.0/libv8-3.16.14.19/gem_make.out
❯ gem install libv8 -v '3.16.14.19' -- --with-system-v8
Building native extensions with: '--with-system-v8'
This could take a while...
Successfully installed libv8-3.16.14.19
Parsing documentation for libv8-3.16.14.19
Installing ri documentation for libv8-3.16.14.19
Done installing documentation for libv8 after 0 seconds
1 gem installed
❯ gem install therubyracer -v '0.12.3'
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
current directory: /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/therubyracer-0.12.3/ext/v8
/Users/vaibhavgupta/.rvm/rubies/ruby-2.5.5/bin/ruby -I /Users/vaibhavgupta/.rvm/rubies/ruby-2.5.5/lib/ruby/site_ruby/2.5.0 -r ./siteconf20210120-6195-ojni3j.rb extconf.rb
checking for -lpthread... yes
checking for -lobjc... yes
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/vaibhavgupta/.rvm/rubies/ruby-2.5.5/bin/$(RUBY_BASE_NAME)
--with-pthreadlib
--without-pthreadlib
--with-objclib
--without-objclib
--enable-debug
--disable-debug
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/lib
/Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/ext/libv8/location.rb:50:in `configure': By using --with-system-v8, you have chosen to use the version (Libv8::Location::System::NotFoundError)
of V8 found on your system and *not* the one that is bundled with
the libv8 rubygem.
However, your system version of v8 could not be located.
Please make sure your system version of v8 that is compatible
with 3.16.14.19 installed. You may need to use the
--with-v8-dir option if it is installed in a non-standard location
from /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/extensions/-darwin-20/2.5.0/therubyracer-0.12.3/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/therubyracer-0.12.3 for inspection.
Results logged to /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/extensions/-darwin-20/2.5.0/therubyracer-0.12.3/gem_make.out
❯ gem install therubyracer -v '0.12.3' -- --with-v8-dir=/opt/homebrew/opt/v8
Building native extensions with: '--with-v8-dir=/opt/homebrew/opt/v8'
This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
current directory: /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/therubyracer-0.12.3/ext/v8
/Users/vaibhavgupta/.rvm/rubies/ruby-2.5.5/bin/ruby -I /Users/vaibhavgupta/.rvm/rubies/ruby-2.5.5/lib/ruby/site_ruby/2.5.0 -r ./siteconf20210120-6214-10f7ru2.rb extconf.rb --with-v8-dir\=/opt/homebrew/opt/v8
checking for -lpthread... yes
checking for -lobjc... yes
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/vaibhavgupta/.rvm/rubies/ruby-2.5.5/bin/$(RUBY_BASE_NAME)
--with-pthreadlib
--without-pthreadlib
--with-objclib
--without-objclib
--enable-debug
--disable-debug
--with-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/lib
/Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/ext/libv8/location.rb:50:in `configure': By using --with-system-v8, you have chosen to use the version (Libv8::Location::System::NotFoundError)
of V8 found on your system and *not* the one that is bundled with
the libv8 rubygem.
However, your system version of v8 could not be located.
Please make sure your system version of v8 that is compatible
with 3.16.14.19 installed. You may need to use the
--with-v8-dir option if it is installed in a non-standard location
from /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/extensions/-darwin-20/2.5.0/therubyracer-0.12.3/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/therubyracer-0.12.3 for inspection.
Results logged to /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/extensions/-darwin-20/2.5.0/therubyracer-0.12.3/gem_make.out
❯ gem install therubyracer -v '0.12.3' -- --with-v8-dir=/opt/homebrew/opt/v8/libexec/
Building native extensions with: '--with-v8-dir=/opt/homebrew/opt/v8/libexec/'
This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
current directory: /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/therubyracer-0.12.3/ext/v8
/Users/vaibhavgupta/.rvm/rubies/ruby-2.5.5/bin/ruby -I /Users/vaibhavgupta/.rvm/rubies/ruby-2.5.5/lib/ruby/site_ruby/2.5.0 -r ./siteconf20210120-6235-1hlxxtd.rb extconf.rb --with-v8-dir\=/opt/homebrew/opt/v8/libexec/
checking for -lpthread... yes
checking for -lobjc... yes
checking for v8.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/vaibhavgupta/.rvm/rubies/ruby-2.5.5/bin/$(RUBY_BASE_NAME)
--with-pthreadlib
--without-pthreadlib
--with-objclib
--without-objclib
--enable-debug
--disable-debug
--with-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/lib
/Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/ext/libv8/location.rb:50:in `configure': By using --with-system-v8, you have chosen to use the version (Libv8::Location::System::NotFoundError)
of V8 found on your system and *not* the one that is bundled with
the libv8 rubygem.
However, your system version of v8 could not be located.
Please make sure your system version of v8 that is compatible
with 3.16.14.19 installed. You may need to use the
--with-v8-dir option if it is installed in a non-standard location
from /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/libv8-3.16.14.19/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/extensions/-darwin-20/2.5.0/therubyracer-0.12.3/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/gems/therubyracer-0.12.3 for inspection.
Results logged to /Users/vaibhavgupta/.rvm/gems/ruby-2.5.5/extensions/-darwin-20/2.5.0/therubyracer-0.12.3/gem_make.out
This works for me:
Ruby version: 2.6.1
OS version: macOS Big Sur 11.2
Install HomeBrew using Rosetta Termina
https://5balloons.info/correct-way-to-install-and-use-homebrew-on-m1-macs/
brew install v8#3.15
gem install libv8 -v '3.16.14.19' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8#3.15
I fixed this by installing V8 on Rosseta 2 as V8 not yet supported for ARM.
You can try this
gem install therubyracer -v '0.12.3' --
--with-v8-dir=/usr/local/opt/v8#3.15
Or install V8 on Rosseta 2.
Update: How to install ruby in x86_64 for M1.
Install homebrew in x86_64. Please refer to this guide How to install ruby on m1
Install ASDF using x86_64
Install all other dependencies on x86_64 only such as postgres, redis, and V8 using x86_64 only.

Unable to install therubyracer on clean install of Yosemite and clean version of ruby

There are many people with similar issues and I've been one of them in the past on other machines and none of the solutions out there appear to work -- I also appear to have different error than others who have similar problems:
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
/Users/username/.rvm/rubies/ruby-2.0.0-p353/bin/ruby -r ./siteconf20150412-25981-y7cvt6.rb extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling accessor.cc
clang: warning: argument unused during compilation: '-rdynamic'
In file included from accessor.cc:1:
In file included from ./rr.h:6:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/vector:265:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__bit_reference:15:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628:
In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604:
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found
#include <__debug>
^
1 error generated.
make: *** [accessor.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/ecnalyr/.rvm/gems/ruby-2.0.0-p353#canopy/gems/therubyracer-0.12.2 for inspection.
Results logged to /Users/ecnalyr/.rvm/gems/ruby-2.0.0-p353#canopy/extensions/x86_64-darwin-14/2.0.0/therubyracer-0.12.2/gem_make.out
When running:
gem install therubyracer -v '0.12.2'
or simply
bundle install
with therubyracer included in my gemfile.
I'm running Yosemite 10.10.3, Ruby 2.0.0-p353, I have uninstalled everything and tried the gem install libv8 -- --with-system-v8 solution that comes up frequently with these kind of problems, but have found no resolution.
Creating a temporary file '__debug' solved this issue for me.
Run this command in terminal:
echo '#define _LIBCPP_ASSERT(x, m) ((void)0)' | sudo tee -a /Library/Developer/CommandLineTools/usr/include/c++/v1/__debug > /dev/null
I was able to solve this by re-installing Command Line Tools for XCode 6.2 (instead of those for XCode 6.3).
There's more discussion in Stack Overflow 29529455.

Installing Xiki on Mac OS 10.10

Has anyone successfully installed Xiki on Mac OS Yosemite? The developer's advice is that it is only compatible with Ruby 1.9.3, but Yosemite ships with 2.0.0, and I cannot successfully build 1.9.3 for Mac OS 10.10 (there are no pre-baked binaries, unsurprisingly).
How did you compile for 10.9.3 ?
I got :
sudo gem install xiki --pre
Building native extensions. This could take a while...
ERROR: Error installing xiki:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
creating Makefile
make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [generator.bundle] Error 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/json-1.8.1/ext/json/ext/generator/gem_make.out

Installing sqlite3 gem is not working on my Linux Mint x64

I've found lots of these questions around, but none of the solutions given work. I also haven't seen x64 mentioned, so maybe that is related.
The issue is this:
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:3:in `<main>'
What I've tried so far:
installing sqlite3 & libsqlite3-dev through apt
installing sqlite3 using newest binaries from http://www.sqlite.org/
specifying sqlite3-dir (gem install sqlite3 -- --with-sqlite3-dir=/usr/local/lib)
I'm a little desperate at this point. Any thoughts?
/usr/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
This says it can't find the file mkmf. This file comes with -dev ruby builds. For ruby1.9.1 like you're error message says you're running, you need to have ruby1.9.1-dev installed
sudo aptitude install ruby1.9.1-dev
Mint is just a derivative of Ubuntu, so it's worth your while to search for people running Ubuntu having issues like this as well. For example: `require': no such file to load -- mkmf (LoadError)
You need to install the sqlite3-ruby gem.

Anyone having issues installing bson_ext gem in OSX lion

OSX Lion, Xcode 4.2, GCC 4.2
I get the following error installing bson_ext 1.4.1
Building native extensions. This could take a while...
ERROR: Error installing bson_ext:
ERROR: Failed to build gem native extension.
/Users/user/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for asprintf()... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
I just ran into this. You should look in the mkmf.log file. Chances are, it's looking for GCC in the wrong place. I had to:
cd /usr/bin
sudo ln -s i686-apple-darwin11-llvm-gcc-4.2 i686-apple-darwin11-gcc-4.2.1
And all was well.
The accepted answer did not work for me. But this did.
I am using:
OS X 10.8.2
Xcode 4.6 (with command line tools)
bson_ext 1.8.2
cd /usr/bin && sudo ln -s ./gcc gcc-4.2
$ gem install bson_ext -v 1.8.2
Building native extensions. This could take a while...
Successfully installed bson_ext-1.8.2
1 gem installed
Installing ri documentation for bson_ext-1.8.2...
Installing RDoc documentation for bson_ext-1.8.2...
So re-installing OSX lion fixed the problem. I guess uninstalling xcode 4.1 in the first place messed up my developer tools installation.
Thanks for the help.
I don't use XCode for anything but the developer tool binaries so I just uninstalled XCode:
sudo /Developer/Library/uninstall-devtools –mode=all
And then installed this:
https://github.com/kennethreitz/osx-gcc-installer
Fixed the problem right up and I saved some HD space to boot.