2013-07-19 2 views
0

У меня есть проект, над которым работают разработчики, и я должен сделать переднюю часть на их версии. У меня был рубин, отлично работающий на моей машине, пока я не попробовал их версию.Ruby не удается установить

кажется, что mysql2 не хочет устанавливать.

Вот журнал ошибки:

bundle install 
Fetching gem metadata from https://rubygems.org/....... 
Fetching gem metadata from https://rubygems.org/.. 
Fetching https://github.com/amatsuda/kaminari.git 
remote: Counting objects: 3409, done. 
remote: Compressing objects: 100% (2040/2040), done. 
remote: Total 3409 (delta 1665), reused 2858 (delta 1159) 
Receiving objects: 100% (3409/3409), 632.95 KiB | 936 KiB/s, done. 
Resolving deltas: 100% (1665/1665), done. 
Fetching http://github.com/thoughtbot/paperclip.git 
remote: Counting objects: 8432, done. 
remote: Compressing objects: 100% (5676/5676), done. 
remote: Total 8432 (delta 4363), reused 6581 (delta 2612) 
Receiving objects: 100% (8432/8432), 2.68 MiB | 2.05 MiB/s, done. 
Resolving deltas: 100% (4363/4363), done. 
Enter your password to install the bundled RubyGems to your system: 
Using rake (10.1.0) 
Using i18n (0.6.4) 
Using multi_json (1.7.7) 
Installing activesupport (3.2.9) 
Installing builder (3.0.4) 
Installing activemodel (3.2.9) 
Using erubis (2.7.0) 
Installing journey (1.0.4) 
Installing rack (1.4.5) 
Installing rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.3) 
Using tilt (1.4.1) 
Installing sprockets (2.2.2) 
Installing actionpack (3.2.9) 
Using mime-types (1.23) 
Using polyglot (0.3.3) 
Using treetop (1.4.14) 
Installing mail (2.4.4) 
Installing actionmailer (3.2.9) 
Installing arel (3.0.2) 
Using tzinfo (0.3.37) 
Installing activerecord (3.2.9) 
Installing activeresource (3.2.9) 
Installing xml-simple (1.1.2) 
Installing aws-s3 (0.6.3) 
Installing json (1.8.0) 
Installing nokogiri (1.5.10) 
Installing uuidtools (2.1.4) 
Installing aws-sdk (1.12.0) 
Installing bcrypt-ruby (3.1.1) 
Installing coderay (1.0.9) 
Installing better_errors (0.9.0) 
Installing debug_inspector (0.0.2) 
Installing binding_of_caller (0.7.2) 
Installing climate_control (0.0.3) 
Installing cocaine (0.5.1) 
Installing coffee-script-source (1.6.3) 
Installing execjs (1.4.0) 
Installing coffee-script (2.2.0) 
Installing rack-ssl (1.3.3) 
Installing rdoc (3.12.2) 
Using thor (0.18.1) 
Installing railties (3.2.9) 
Installing coffee-rails (3.2.2) 
Installing daemons (1.1.9) 
Installing orm_adapter (0.4.0) 
Installing warden (1.2.3) 
Installing devise (3.0.0) 
Installing eventmachine (1.0.3) 
Installing haml (4.0.3) 
Using kaminari (0.14.1) from https://github.com/amatsuda/kaminari.git (at master) 
Installing libv8 (3.11.8.17) 
Installing mysql2 (0.3.12) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. 

    /Users/lukaszwieczorek/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb 
checking for rb_thread_blocking_region()... yes 
checking for rb_wait_for_single_fd()... yes 
checking for rb_hash_dup()... yes 
checking for rb_intern3()... yes 
checking for mysql_query() in -lmysqlclient... no 
checking for main() in -lm... yes 
checking for mysql_query() in -lmysqlclient... no 
checking for main() in -lz... yes 
checking for mysql_query() in -lmysqlclient... no 
checking for main() in -lsocket... no 
checking for mysql_query() in -lmysqlclient... no 
checking for main() in -lnsl... no 
checking for mysql_query() in -lmysqlclient... no 
checking for main() in -lmygcc... no 
checking for mysql_query() in -lmysqlclient... 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/lukaszwieczorek/.rvm/rubies/ruby-2.0.0-p247/bin/ruby 
    --with-mysql-config 
    --without-mysql-config 
    --with-mysql-dir 
    --without-mysql-dir 
    --with-mysql-include 
    --without-mysql-include=${mysql-dir}/include 
    --with-mysql-lib 
    --without-mysql-lib=${mysql-dir}/ 
    --with-mysqlclientlib 
    --without-mysqlclientlib 
    --with-mlib 
    --without-mlib 
    --with-mysqlclientlib 
    --without-mysqlclientlib 
    --with-zlib 
    --without-zlib 
    --with-mysqlclientlib 
    --without-mysqlclientlib 
    --with-socketlib 
    --without-socketlib 
    --with-mysqlclientlib 
    --without-mysqlclientlib 
    --with-nsllib 
    --without-nsllib 
    --with-mysqlclientlib 
    --without-mysqlclientlib 
    --with-mygcclib 
    --without-mygcclib 
    --with-mysqlclientlib 
    --without-mysqlclientlib 


Gem files will remain installed in /Users/lukaszwieczorek/.bundler/tmp/2999/gems/mysql2-0.3.12 for inspection. 
Results logged to /Users/lukaszwieczorek/.bundler/tmp/2999/gems/mysql2-0.3.12/ext/mysql2/gem_make.out 

An error occurred while installing mysql2 (0.3.12), and Bundler cannot continue. 
Make sure that `gem install mysql2 -v '0.3.12'` succeeds before bundling. 

вещи я пытался:

  • почти каждый StackOverflow вопрос по этому конкретному вопросу - ручная установка MySQL (Суд самоцвет установки MySQL - - -with-mysql-config =/usr/local/mysql/bin/mysql_config)
  • удаление рубинов полностью и переустановка
  • удаление rvm a й resintalling
  • с использованием http://railsinstaller.org/
  • mysql2 gem fails to compile with MySQL 5.6.12 on OS X with Homebrew

также пытались использовать отвар для установки и получил это:

заварить установить MySQL

Warning: It appears you have MacPorts or Fink installed. 
Software installed with other package managers causes known problems for 
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again. 
Warning: Building source; cellar of mysql's bottle is /usr/local/Cellar 
==> Downloading http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.10.tar.gz/from/http://cdn.mysql.com/ 

curl: (22) The requested URL returned error: 404 
Error: Download failed: http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.10.tar.gz/from/http://cdn.mysql.com/ 

на немного потери относительно того, что делать. Я запускаю OSX.

+1

Какая ОС вы используете? – Shelvacu

+0

Я использую OSX 10.8 – Lukasz

+0

Возможный дубликат [Gem mysql2 не скомпилирован с последним mysql, 5.6.12, в MacOS X с Homebrew] (http://stackoverflow.com/questions/17238226/gem-mysql2- doesnt-compile-with-the-latest-mysql-5-6-12-in-macos-x-with-homebr) –

ответ

0

Похоже, вы устанавливаете драгоценный камень mysql2, который, по-видимому, зависит от библиотеки C с именем mysqlclient. Установка gem не работает, потому что не может найти mysqlclient. Это стандартная вещь, которая случалась с нами все время, и решение заключалось в том, чтобы установить эту библиотеку.

В Ubuntu, запустите:

sudo apt-get install libmysqlclient-dev 

Для других дистрибутивов команда для установки mysqlclient будет отличаться.

+0

да, я пробовал версию osx. не повезло. – Lukasz

Смежные вопросы