简体   繁体   中英

Rails server command returns error in Windows XP using rails 4.0.2 and ruby 2.0.0 version (x32)

I am setting up the installation process for rails 4 and downloaded and installed the pre-requisites for me to get used of rails 4 for development purpose.I have followed the lynda essential training rails 4 video tutorial.I am almost done with the installation process until I have typed the command rails server and unfortunately it return this error. I have been searching this on the internet and read some related problems but still I just can't make it work. Please help. Here are some information and the error returned

Ruby Version : ruby 2.0.0p353 Rails Version: 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>

You should install a MySQL server kit to your OS. It contains some libs that the gem mysql2 needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM