2

I installed MySQL 5.5 ( mysql-installer-5.5.15.0.msi ) and mysql gem ( with "gem install mysql" command ) . Now I write a simple program and when I run it ruby give me this message :

C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36: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)

can someone help me to solve this problem? thanks


I copied "libmySQL.dll" file from 'C:\Program Files\MySQL\MySQL Server 5.1\bin' to 'C:\Ruby192\bin' but now when I run a program Ruby give me this error :

C:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': 193: %1 is not a valid Win32 application.   - C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/1.9/mysql_api.so (LoadError)
Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
amir amir
  • 3,375
  • 7
  • 26
  • 29
  • 2
    See also http://stackoverflow.com/questions/5164818/loaderror-trying-to-use-mysql-with-ruby-on-rails-in-windows-rubymine-ide or http://stackoverflow.com/questions/4241068/rubymine-3-0-setup-on-windows-7 – knut Aug 28 '11 at 23:06

1 Answers1

2

http://instantrails.rubyforge.org/svn/trunk/InstantRails-win/InstantRails/mysql/bin/ You have to use the libmysql.dll here to resolve the problem.