Gem install activerecord-mysql2-adapter: cannot load such file -- mkmf (LoadError)


Материал из Wiki - Iphoster - 'the best ever support'

Перейти к: навигация, поиск

Gem install activerecord-mysql2-adapter: cannot load such file -- mkmf (LoadError)

Ошибка при установке на Debian гема activerecord-mysql2-adapter:

 # gem install activerecord-mysql2-adapter
Building native extensions.  This could take a while...
ERROR:  Error installing activerecord-mysql2-adapter:
       ERROR: Failed to build gem native extension.
       /usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
       from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
       from extconf.rb:2:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/mysql2-0.4.4 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/mysql2-0.4.4/ext/mysql2/gem_make.out


решается установкой ruby-dev:

# apt-get install ruby-dev


# gem install activerecord-mysql2-adapter
Building native extensions.  This could take a while...
Fetching: activerecord-mysql2-adapter-0.0.3.gem (100%)
Successfully installed mysql2-0.4.4
Successfully installed activerecord-mysql2-adapter-0.0.3
2 gems installed
Installing ri documentation for mysql2-0.4.4...
Installing ri documentation for activerecord-mysql2-adapter-0.0.3...
Installing RDoc documentation for mysql2-0.4.4...
Installing RDoc documentation for activerecord-mysql2-adapter-0.0.3...
Индекс цитирования