Problem installing mysql gem

Hi guys,

I'm totally new in ruby. I'd appreciate some help.

I followed the Getting Started guide in www.rubyonrails.org, and got the server up and running on a sample app I've created, as the guide perscribed.

Now I'm stuck with the installation of mysql gem.

I've tried "gem install mysql -- --with-mysql-config="c:\Program Files \MySQL\MySQL Server 5.0\scripts\mysql_config". All I got was:

Successfully installed mysql-2.7.3-x86-mswin32 1 gem installed Installing ri documentation for mysql-2.7.3-x86-mswin32... Installing RDoc documentation for mysql-2.7.3-x86-mswin32... ERROR: While generating documentation for mysql-2.7.3-x86-mswin32 ... MESSAGE: Unhandled special: Special: type=17, text="<!-- $Id: README.html,v 1.20 2006-12-20 05:31:52 tommy Exp $ - ->" ... RDOC args: --op C:/Asaf/dev/ruby/lib/ruby/gems/1.8/doc/mysql-2.7.3- x86-mswin32/rdoc --exclude ext --main README --qu iet ext README docs/README.html (continuing with the rest of the installation)

I've downloading the api by my self and install it, but it keeps failing on:

have_library: checking for main() in libmysql.lib... -------------------- no

"cl -nologo -Feconftest -I. -IC:/Asaf/dev/ruby/lib/ruby/1.8/i386- mswin32 -I. -IC:/Asaf/dev/ruby/lib/ruby/1.8/i386-mswin32 -MD -Zi - O2b2xg- -G6 conftest.c msvcrt-ruby18-static.lib libmysql.lib oldnames.lib user32.lib advapi32.lib ws2_32.lib -link - libpath:"." -libpath:"C:/Asaf/dev/ruby/lib" -stack:0x2000000" checked program was: /* begin */ 1: #define WIN32_LEAN_AND_MEAN 2: #include <winsock2.h> 3: #include <windows.h> 4: 5: /*top*/ 6: int main() { return 0; } 7: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; } /* end */

"cl -nologo -Feconftest -I. -IC:/Asaf/dev/ruby/lib/ruby/1.8/i386- mswin32 -I. -IC:/Asaf/dev/ruby/lib/ruby/1.8/i386-mswin32 -MD -Zi - O2b2xg- -G6 conftest.c msvcrt-ruby18-static.lib libmysql.lib oldnames.lib user32.lib advapi32.lib ws2_32.lib -link - libpath:"." -libpath:"C:/Asaf/dev/ruby/lib" -stack:0x2000000" checked program was: /* begin */ 1: /*top*/ 2: int main() { return 0; } 3: int t() { main(); return 0; } /* end */

Did you try

gem install mysql -- --with-mysql-config="c:\Program Files\MySQL\MySQL Server 5.0\scripts\mysql_config" --no-rdoc --no-ri

Looks like its the doc generation thats failing...

heimdull wrote:

Did you try

gem install mysql -- --with-mysql-config="c:\Program Files\MySQL\MySQL Server 5.0\scripts\mysql_config" --no-rdoc --no-ri

Looks like its the doc generation thats failing...

I'm also having the same problem. Tried that ant it still doesn't work.

In addition, I'm getting this when trying to run in rails:

The specified module could not be found. - c:/ruby/lib/ruby/gems/1.8/gems/mysql-2.7.3-x86-mswin32/ext/mysql.so

Hi I also got this problem....

Has anyone an idea??

Try installing MySQL in a directory without any spaces, e.g., c: \mysql5. And then try installing the mysql gem. Bharat

Bharat Ruparel wrote:

Try installing MySQL in a directory without any spaces, e.g., c: \mysql5. And then try installing the mysql gem. Bharat

I have the same problem and didn't find the solution yet. I've reinstalled my mysql to c:\mysql but I got the same problem.

Did anyboyd find a solution?

Felipe Rodrigues wrote:

Bharat Ruparel wrote:

Try installing MySQL in a directory without any spaces, e.g., c: \mysql5. And then try installing the mysql gem. Bharat

I have the same problem and didn't find the solution yet. I've reinstalled my mysql to c:\mysql but I got the same problem.

Did anyboyd find a solution?

Ok... found the solution. At least for me.

remove the RUBY_HOME\lib\ruby\gems\1.8\gems\mysql-2.7.3-x86-mswin32\ext\mysql.so and everything will work again.

Also, some people noticed that this files is also on RUBY_HOME\lib\ruby\site_ruby\1.8\i386-msvcrt

Removing or renaming this file fix the problem as suggested on this thread http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/55dd057c41a72fc5

Thanks anyway. =)