Gem ruby mysql 模块问题

zhan_boom · 2012年09月29日 · 最后由 zhan_boom 回复于 2012年09月29日 · 2277 次阅读

[root@chefserver dir]# gem install mysql2 Building native extensions. This could take a while... Successfully installed mysql2-0.3.11 1 gem installed Installing ri documentation for mysql2-0.3.11... Installing RDoc documentation for mysql2-0.3.11...

[root@chefserver dir]# irb irb(main):001:0> require 'mysql2' LoadError: no such file to load -- mysql2 from (irb):1:in `require' from (irb):1 from :0

已经提示安装了 为什么还报错?难道还有其他关联?

ruby 版本呢,1.8.7 需要先 require 'rubygems'

#1 楼 @diudiutang thanks 我的版本是 1.8.7 现在在自学 ruby 有些问题还不懂 网了查也没查到合适的

需要 登录 后方可回复, 如果你还没有账号请 注册新账号