简体   繁体   中英

problem with running ruby application

I am using RubyMine on windows so I can run a given ruby on rails application. When I click run I get the following error:

C:\Ruby192\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) "F:/Aurora Zoo Project/zooniverse-Juggernaut-a46b0ba558f0cbeb8e9b581513691566d7f19c2f/script/rails" server -b 127.0.0.1 -p 3000 -e development
C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/mysql.rb:7:in `require': 126: The specified module could not be found.   - C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/1.9/mysql_api.so (LoadError)
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/mysql.rb:7:in `rescue in <top (required)>'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/mysql.rb:2:in `<top (required)>'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `each'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `block in require'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `each'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `require'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.18/lib/bundler.rb:120:in `require'
    from F:/Aurora Zoo Project/zooniverse-Juggernaut-a46b0ba558f0cbeb8e9b581513691566d7f19c2f/config/application.rb:7:in `<top (required)>'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:28:in `require'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:28:in `block in <top (required)>'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:27:in `tap'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.5/lib/rails/commands.rb:27:in `<top (required)>'
    from F:/Aurora Zoo Project/zooniverse-Juggernaut-a46b0ba558f0cbeb8e9b581513691566d7f19c2f/script/rails:9:in `require'
    from F:/Aurora Zoo Project/zooniverse-Juggernaut-a46b0ba558f0cbeb8e9b581513691566d7f19c2f/script/rails:9:in `<top (required)>'
    from -e:1:in `load'
    from -e:1:in `<main>'

Process finished with exit code 1

I am not really familiar with ruby, but it says something about "mysql" which I have installed and added to the PATH variable. Any help? Thx

The mysql gem that you installed expect an specific version of MySQL libmysql.dll be available in your system (when you gem install mysql it display the proper legend in the console).

mysql_api.so is failing to load and thus, generating the error you're seeing.

I've blogged about an alternate approach to install and compile the MySQL component independently of the version of MySQL you have installed.

http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/

Hope that helps.

This is probably version problem. I do had a same issue when i used old mysql version with new mysql gem.

Kindly find the correctly gem required for you mysql server.

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