Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
255 views
in Technique[技术] by (71.8m points)

193: %1 is not a valid Win32 application error with Ruby (1.9.3) on Rails(3.2.3) with MySQL(5.5) on Windows 7

I cannot seem to run a rail application configured to MySQL. When I run the project, I get the following error:

193: %1 is not a valid Win32 application. - C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql-2.8.1-x86-mingw32/lib/1.9/mysql_api.so

I've noticed others have hit this but I didn't find any solutions that worked for me. Here's what I've tried so far:

  • Copying libmysql.dll to the ruby bin folder
  • Tried older version of MySQL (5.0)
  • Checked the ImagePath for MySQL on regedit

Can anyone provide guidance here? Is this just a lost cause? Does using Linux or other versions of Ruby/Rails/MySQL combo fix this?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Looks that you installed the binary pre-compiled version of MySQL gem, which requires an specific version of MySQL to be installed.

More important, it requires an specific version of libmysql.dll be available in the PATH so the gem can use it.

I would recommend you uninstall the pre-compiled gem and proceed with the manual compilation steps described here:

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

This has been answered before too:

Ruby Gem for mysql 5.5 in windows

Is Datamapper's dm_mysql_adapter gem supported on windows?

Finally installed MySQL for Rails in Windows 64 bit, and now

on windows Mysql native extension prob in ruby on rails gem time

Hope that helps.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...