Rails服务器命令使用rails 4.0.2和ruby 2.0.0版本(x32)在Windows XP中返回错误

时间:2014-01-25 05:43:49

标签: ruby-on-rails ruby windows

我正在设置rails 4的安装过程并下载并安装了我的先决条件,以便将rails 4用于开发目的。我已经按照lynda必要的培训rails 4视频教程。我差不多完成了安装过程,直到我输入命令 rails server ,不幸的是它返回此错误。我一直在互联网上搜索这个并阅读一些相关的问题,但我仍然无法使其工作。请帮忙。以下是一些信息和返回的错误

Ruby版本: ruby​​ 2.0.0p353 Rails版本: Rails 4.0.2

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\apploma>cd../..

C:\>cd Sites

C:\Sites>cd simple_cms

C:\Sites\simple_cms>rails server
C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.14/lib/mysql2.rb:8:in `require':
127: The specified procedure could not be found.   - C:/Ruby200/lib/ruby/gems/2.
0.0/extensions/x86-mingw32/2.0.0/mysql2-0.3.14/mysql2/mysql2.so (LoadError)
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/mysql2-0.3.14/lib/mysql2.rb:8:i
 n `<top (required)>'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.pre.1/lib/bundler
/runtime.rb:76:in `require'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.pre.1/lib/bundler
/runtime.rb:76:in `block (2 levels) in require'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.pre.1/lib/bundler
/runtime.rb:72:in `each'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.pre.1/lib/bundler
/runtime.rb:72:in `block in require'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.pre.1/lib/bundler
/runtime.rb:61:in `each'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.pre.1/lib/bundler
/runtime.rb:61:in `require'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/bundler-1.6.0.pre.1/lib/bundler
.rb:131:in `require'
    from C:/Sites/simple_cms/config/application.rb:7:in `<top (required)>'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/comman
 ds.rb:74:in `require'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/comman
 ds.rb:74:in `block in <top (required)>'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/comman
 ds.rb:71:in `tap'
    from C:/Ruby200/lib/ruby/gems/2.0.0/gems/railties-4.0.2/lib/rails/comman
 ds.rb:71:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

 C:\Sites\simple_cms>

1 个答案:

答案 0 :(得分:0)

您应该在操作系统中安装MySQL服务器套件。它包含一些gem mysql2所需的库。