相关疑难解决方法(0)

带有mysql2和rails3(bundler)的RuntimeError

我收到这个错误

`establish_connection': Please install the mysql2 adapter: `gem install activerecord-mysql2-adapter` (no such file to load -- active_record/connection_adapters/mysql2_adapter) (RuntimeError)
  from /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/activerecord-
Run Code Online (Sandbox Code Playgroud)

是整个错误和我的配置和gemfile的转储.

mysql ruby-on-rails bundler

76
推荐指数
5
解决办法
6万
查看次数

mysql2 gem编译为错误的mysql客户端库

当尝试通过我的rails应用程序连接到mysql服务器时,我收到以下错误

D:/Program_Files/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 
Incorrect MySQL client library version! This gem was compiled for 6.0.0 but the client library is 5.0.27. (RuntimeError)
Run Code Online (Sandbox Code Playgroud)

我怎样才能纠正它?

mysql windows ruby-on-rails mysql2

64
推荐指数
3
解决办法
6万
查看次数

错误通过Bundler安装mysql2 gem

我试图mysql2通过Bundler 安装gem,但它一直死于以下错误:

** executing command
/home/cc_rails/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in 'rescue in block in build_extensions': 
ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/home/cc_rails/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb --with-mysql-config=/usr/bin/mysql_config
checking for rb_thread_blocking_region()... 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.  Check the mkmf.log file for more
details.  You may need configuration …
Run Code Online (Sandbox Code Playgroud)

ruby mysql rubygems ruby-on-rails bundler

61
推荐指数
4
解决办法
4万
查看次数

错误:无法构建gem本机扩展 - 安装mysql2时出错

运行bundle install时出错

Installing mysql2 (0.3.11) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
...
Make sure that `gem install mysql2 -v '0.3.11'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)

当我运行确保gem install mysql2 -v '0.3.11'.我仍然得到相同的错误.

ruby mysql rubygems ruby-on-rails bundler

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

gem install mysql2失败

我收到了这个错误:

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

/usr/bin/ruby1.8 extconf.rb
checking for rb_thread_blocking_region()... no
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.  Check the mkmf.log file for more
details.  You may …
Run Code Online (Sandbox Code Playgroud)

mysql ubuntu gem

27
推荐指数
3
解决办法
2万
查看次数

具有本机扩展的MySQL2错误:无法构建gem本机扩展.(宝石::安装:: ExtensionBuildError)

我正在尝试为Ruby Enterprise Edition安装gem mysql2.我收到的错误是:

    Installing mysql2 (0.2.7) with native extensions /Users/rookieRails/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/installer.rb:551:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        /Users/vinayashrestha/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby extconf.rb 
checking for rb_thread_blocking_region()... no
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 …
Run Code Online (Sandbox Code Playgroud)

rubygems ruby-on-rails

20
推荐指数
4
解决办法
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万
查看次数

Ruby gem mysql2安装错误

我在Windows7中安装了Ruby版本ruby 1.9.2p0(2010-08-18)[i386-mingw32].和宝石vesion 1.3.7

当我试图安装mysql gem时,它显示Failed to build gem native extension错误,为什么会这样?我的mysql版本是5.1.36(WampServer)

E:\RubyApps\test_app2>gem install mysql2
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
        ERROR: Failed to build gem native extension.

E:/Ruby192/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... *** 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
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog …
Run Code Online (Sandbox Code Playgroud)

ruby installation rubygems

13
推荐指数
2
解决办法
3万
查看次数

为Ruby on Rails 3.1.0安装mysql2 gem

我收到这个错误

Gem文件将保留在
/home/mark/.bundler/tmp/28288/gems/mysql2-0.2.17中进行检查.
结果登录到
/home/mark/.bundler/tmp/28288/gems/mysql2-0.2.17/ext/mysql2/gem_make.out
安装mysql2(0.2.17)时出错,Bundler无法
继续. 在捆绑之前确保gem install mysql2 -v '0.2.17'成功
.

使用Ruby on Rails应用程序,我无法解决它.

ruby ruby-on-rails

11
推荐指数
2
解决办法
4665
查看次数

无法安装do_mysql gem?

我正在尝试在我的Snow Leopord系统Macbook Pro 13上安装do_mysql,但我不断收到此错误:

n216-160:~ myself$ sudo gem1.9 install do_mysql
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing do_mysql:
    ERROR: Failed to build gem native extension.

/opt/local/bin/ruby1.9 extconf.rb
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
    --without-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 …
Run Code Online (Sandbox Code Playgroud)

ruby mysql macos rubygems

10
推荐指数
4
解决办法
1万
查看次数

标签 统计

mysql ×7

ruby-on-rails ×7

ruby ×6

rubygems ×5

bundler ×3

gem ×2

macos ×2

installation ×1

mysql2 ×1

ubuntu ×1

windows ×1