Ruby on Rails Win7 x64?

谁都会走 提交于 2019-12-04 19:54:04

It was a DLL problem after all, went 1.8.6, x32 MySQL and OpenSSL, unpacked every dll mentioned in this excellent blog post and it's all running smoothly again, gosh ! And yes, I've answered my own question after all :-) Thank you !

This helped me from https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-fraps_violation


After investigation, having tools that alter loading DLLs (like FRAPS or Detours) can affect loading Ruby’s extensions.

It is recommended you disable/uninstall FRAPS.


That fixed it for me.

For Rails or DataMapper or whatever to talk to MySQL you need a 32-bit driver in Rails\bin. The driver is called libmysql.dll. Even if you have a 64-bit server you need a 32-bit driver.

64-bit driver will fail will ruby/gems/1.8/gems/do_mysql-0.10.2-x86-mingw32/lib/do_mysql/1.8/do_mysql.so: 193: %1 is not a valid Win32 application.

a wrong 32-bit version will crash with memory allocation error or something weird like that

LoadError: 193: %1 is not a valid Win32 application. I got this msg when I tried to load mysql ruby gem in irb. The problem: The libmysql.dll MUST be the same version of mysql found in history.txt of the ruby mysql gem

The fix: (1) Go the the readme.txt and history.txt for the mysql gem and verify the mysql version. (2) Install the corresponding mysql version. (3) Copy the libmysql.dll file from the mysql bin dir to the ruby bin dir. (4) Return to ruby irb and enter "require 'rubygems'" then "require 'mysql'" (5) Say "yeaaah" when you see "true"! Note: You may not really need to install the needed mysql version to get the proper libmysql.dll file. I just found it easier to just install it. If you are like me, this problem was so vexing I thought of giving up on writing the program. So, I hope this solution restores your confidence.

See if this helps: http://www.technipages.com/error-193-1-is-not-a-valid-win32-application.html

From what is mentioned in this article, do you have a folder called "nu" in your D:/ drive? If yes, try renaming it and check if the server runs fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!