无法启动rails server mysql2 gem? [英] Can't start rails server mysql2 gem?

查看:92
本文介绍了无法启动rails server mysql2 gem?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ruby和Rails noob,做了一个项目,并得到了这么多。但是现在我在试图运行rails server的时候遇到了这些错误。我使用Windows vista和ruby 2.0.0。

  D:/Ruby200/lib/ruby/gems/2.0.0 /gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2。 
rb:2:在`require'中:无法加载这样的文件--D:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2中的mysql2 / 2.0 / mysql2(LoadError)
-0.3.11-x86-mingw32 / lib / m
ysql2 / mysql2.rb:2:从<< top(required)>'
from D:/ Ruby200 / lib / ruby​​ / gems /2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/m
ysql2.rb:9:在'require'
从D:/ Ruby200 / lib / ruby​​ / gems / 2.0.0 / gems / mysql2-0.3.11-x86-mingw32 / lib / m
ysql2.rb:9:在< top(required)>'
from D:/ Ruby200 / lib / ruby​​ / gems / 2.0.0 / gems / bundler-1.3.4 / lib / bundler / runti
me.rb:72:在'require'
从D:/ Ruby200 / lib / ruby /gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runti
me.rb:72:在`block(2 levels)in require'
from D:/ Ruby200 / lib / ruby​​ / gems / 2.0.0 / gems / bundler-1.3.4 / lib / bundler / runti
me.rb:70:在`each'
从D:/ Ruby200 / lib / ruby /gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runti
me.rb:70:在`block in require'
从D:/ Ruby200 / lib / ruby​​ /宝石/ 2。 0.0 / gems / bundler-1.3.4 / lib / bundler / runti
me.rb:59:在`each'
from D:/Ruby200/lib/ruby/gems/2.0.0/gems /bundler-1.3.4/lib/bundler/runti
me.rb:59:在`require'
从D:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler- 1.3.4 / lib / bundler.rb:13
2:在'require'中
来自D:/wamp/www/simple_cms/config/application.rb:7:在< top(必需)>
'
from D:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/comma
nds.rb:53:in`需要D中的'
':/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/comma
nds.rb:53:'in block in< ; top(required)>'从$ D $ /
/ :在'tap'
从D:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/comma
nds.rb:50:in` < top(required)>'脚本/导轨中的
:6中的'require'
来自脚本/导轨:6:'< main>'

到目前为止,我对ruby和gems知之甚少,但mysql2 gem似乎是一个问题,至少我已经安装并安装了这个问题,但没有任何帮助。我不断收到一条消息,告知我已经按照我所遵循的顺序安装了二进制版本。这是好事还是坏事?



任何人都请帮助我,如果您需要更多信息,请告诉我。

解决方案

我想这里的答案就是你要找的:

stackoverflow.com/a/5368767/1622843



基本上,您需要指出该宝石使用您的mysql实例安装在你的机器上。


Ruby and rails noob, made a project and got this far. But now I'm getting these errors when trying to run rails server. I'm using Windows vista and ruby 2.0.0.

D:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.
rb:2:in `require': cannot load such file -- mysql2/2.0/mysql2 (LoadError)
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/m
ysql2/mysql2.rb:2:in `<top (required)>'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/m
ysql2.rb:9:in `require'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.11-x86-mingw32/lib/m
ysql2.rb:9:in `<top (required)>'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runti
me.rb:72:in `require'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runti
me.rb:72:in `block (2 levels) in require'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runti
me.rb:70:in `each'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runti
me.rb:70:in `block in require'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runti
me.rb:59:in `each'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler/runti
me.rb:59:in `require'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.3.4/lib/bundler.rb:13
2:in `require'
        from D:/wamp/www/simple_cms/config/application.rb:7:in `<top (required)>
'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/comma
nds.rb:53:in `require'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/comma
nds.rb:53:in `block in <top (required)>'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/comma
nds.rb:50:in `tap'
        from D:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-3.2.13/lib/rails/comma
nds.rb:50:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'

I know very little about ruby and gems so far but the mysql2 gem seems to be a problem wich I have installed and installed to no help. I do constantly get a message that I have installed the binary version with orders that I've followed. Is this a good or bad thing?

Anyone please help me out, if you need more info just let me know.

解决方案

I think the answer here is what you are looking for:

stackoverflow.com/a/5368767/1622843

Basically, you need to point the gem to use your mysql instance installed on your machine.

这篇关于无法启动rails server mysql2 gem?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆