“193: %1 is not a valid Win32 application” bug with a new Rails Application

前端 未结 6 2010
北海茫月
北海茫月 2020-11-29 07:08

I have a new rails application which I have created under Windows 7 by going into a directory and typing \"rails newapp\". The creation went fine, and when I access the root

6条回答
  •  遥遥无期
    2020-11-29 07:26

    Having run into multiple issues setting up MySQL with Rails on Windows x64 my recommendations are:

    • Install the 32-bit version of MySQL, do not try to use the 64-bit version.
    • Install into a path with no spaces, do not accept a default like "C:\Program Files\MySQL\MySQL Server 5.5\"
    • Install the MySQL gem with an invocation similar to:
           gem install mysql -- --platform=ruby --with-mysql-dir="D:\Programs\MySQL\MySQL-Server-5.5" --with-libmysqllib="D:\Programs\MySQL\MySQL-Server-5.5\lib\"
    • Be sure to uninstall/reinstall the gem whenever you install a new version of MySQL.
    • Make sure D:\Programs\MySQL\MySQL-Server-5.5\lib is included in your path, as well as D:\Programs\MySQL\MySQL-Server-5.5\bin. Make sure other copies of libmysql.dll are not being picked up from elsewhere on your path or your ruby installation directories.

    This worked for me with mysql-5.5.15-win32, mysql-2.8.1-x86-mingw32 and Windows 7 x64.

    提交回复
    热议问题