2014-02-20 90 views
0

我无法运行我的rails服务器。我在windows 64位上使用了rails。当我运行无法运行rails服务器

rails server 

我得到如下结果:

C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.15/lib/mysql2.rb 
:8:in `require': 193: %1 is not a valid Win32 application. - C:/RailsInstaller 
/Ruby1.9.3/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/mysql2-0.3.15/mysql2 
/mysql2.so (LoadError) 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.15/ 
lib/mysql2.rb:8:in `<top (required)>' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/ 
lib/bundler/runtime.rb:72:in `require' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/ 
lib/bundler/runtime.rb:72:in `block (2 levels) in require' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/ 
lib/bundler/runtime.rb:70:in `each' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/ 
lib/bundler/runtime.rb:70:in `block in require' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/ 
lib/bundler/runtime.rb:59:in `each' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/ 
lib/bundler/runtime.rb:59:in `require' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/ 
lib/bundler.rb:132:in `require' 
    from C:/Users/azlan187/Sites/simple_cms/config/application.rb:7:in `<top 
(required)>' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2 
/lib/rails/commands.rb:74:in `require' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2 
/lib/rails/commands.rb:74:in `block in <top (required)>' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2 
/lib/rails/commands.rb:71:in `tap' 
    from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-4.0.2 
/lib/rails/commands.rb:71:in `<top (required)>' 
    from bin/rails:4:in `require' 
    from bin/rails:4:in `<main>' 

我绝对不知道如何解决这个问题。任何帮助将非常感激!

ps:请告诉我,如果我需要提供更多信息。谢谢。

回答

0

您使用的是64位系统吗?错误输出的第一行抱怨mysql.so不是有效的Win32应用程序。我会开始调查,如果它没有收到任何东西,请尝试使用Google搜索“mysql gem errors”。我个人在使用mysql gem在Windows上工作时遇到了很多问题,并且从我过去的经验来看,通常这是一个采购正确的libmysql文件的问题。

+0

我使用了64位窗口。我在安装mysql ruby​​ gems时遇到了问题。我尝试使用64位连接器/ C进行安装,但失败。然后,我使用32位连接器/ C安装了mysql ruby​​ gem,它工作正常。我不明白为什么我使用64位窗口。我认为这与我的rails服务器无法运行的原因有关。但我不知道是否必须重新安装mysql ruby​​ gems。 – azlan187