相关疑难解决方法(0)

gem install pg --with-pg-config工作,bundle失败

当我跑(以root身份)

gem install pg -v '0.12.0' -- --with-pg-config=/usr/pgsql-9.1/bin/pg_config
Run Code Online (Sandbox Code Playgroud)

我得到以下输出:

#-> gem instal pg -v '0.12.0' -- --with-pg-config=/usr/pgsql-9.1/bin/pg_config
Building native extensions.  This could take a while...
Successfully installed pg-0.12.0
1 gem installed
Installing ri documentation for pg-0.12.0...
Installing RDoc documentation for pg-0.12.0...
#-> 
Run Code Online (Sandbox Code Playgroud)

当我运行bundle install时:

Installing pg (0.12.0) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb 
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no …
Run Code Online (Sandbox Code Playgroud)

postgresql rubygems bundler pg

69
推荐指数
7
解决办法
7万
查看次数

mysql2 gem无法使用Homebrew在OS X上使用MySQL 5.6.12进行编译

我更新了我用Homebrew安装的所有软件包.MySQL升级到5.6.12(从5.5.27左右):

$ mysql --version
mysql  Ver 14.14 Distrib 5.6.12, for osx10.8 (x86_64) using  EditLine wrapper
Run Code Online (Sandbox Code Playgroud)

现在mysql2 gem不再编译了:

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

        /Users/pupeno/.rvm/rubies/ruby-1.9.3-p429-perf/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql.h... no
checking for mysql/mysql.h... no
-----
mysql.h is missing.  please check your installation of mysql and try again.
-----
*** extconf.rb failed ***
Could not create Makefile …
Run Code Online (Sandbox Code Playgroud)

ruby mysql macos homebrew mysql2

35
推荐指数
6
解决办法
2万
查看次数

缺少mysql.h ....(Ruby on Rails,OSX)

我尝试了几个想法......它们都没有用......我只是想安装mysql2作为宝石.我的mysql正在运行,但每次我的系统说,mysql.h都丢失了......有人有想法吗?现在非常令人沮丧......

我正在使用osx 10.8.3,ruby 1.9.3,rails 3.2.13和home-brew.

    gem install mysql2 -v '0.3.11'
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
    ERROR: Failed to build gem native extension.

        /Users/gadreel/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql.h... no
checking for mysql/mysql.h... no
-----
mysql.h is missing.  please check your installation of mysql and try again.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. …
Run Code Online (Sandbox Code Playgroud)

ruby mysql macos gem ruby-on-rails

14
推荐指数
2
解决办法
1万
查看次数

标签 统计

macos ×2

mysql ×2

ruby ×2

bundler ×1

gem ×1

homebrew ×1

mysql2 ×1

pg ×1

postgresql ×1

ruby-on-rails ×1

rubygems ×1