首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rails生成命令错误?

问Rails生成命令错误?
EN

Stack Overflow用户
提问于 2014-06-24 03:48:20
回答 1查看 144关注 0票数 0

我正尝试在现有的Rails网站上使用Rails generate命令来创建一个新的控制器。

我将存储库签出到我的本地系统,但当我尝试运行generate命令时,我得到了以下错误:

代码语言:javascript
复制
C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:
2:in `require': 126: The specified module could not be found.   - C:/Ruby/lib/ru
by/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/1.9/mysql2.so (LoadError
)
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysq
l2/mysql2.rb:2:in `<top (required)>'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysq
l2.rb:9:in `require'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysq
l2.rb:9:in `<top (required)>'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:76:in `require'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:76:in `block (2 levels) in require'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:72:in `each'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:72:in `block in require'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:61:in `each'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler/runtime.
rb:61:in `require'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/bundler-1.6.3/lib/bundler.rb:132:i
n `require'
        from C:/Users/dboliver/Desktop/Assorted Items/RB_OLTARIS/branch/rails_3_
dev/config/application.rb:15:in `<top (required)>'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands
.rb:24:in `require'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/railties-3.2.13/lib/rails/commands
.rb:24:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'
EN

回答 1

Stack Overflow用户

发布于 2014-06-24 09:47:56

确保MySQL正在运行,您可以运行

代码语言:javascript
复制
mysql.server start

用于确认的命令

然后,运行

代码语言:javascript
复制
bundle install

验证是否也安装了MySQL gem

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24374130

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档