# Trouble installing Ruby On Rails mysql gem in Windows XP

**URL:** <https://www.ruby-forum.com/t/trouble-installing-ruby-on-rails-mysql-gem-in-windows-xp/179592>\
**Category:** Rails\
**Created:** [November 30, 2009, 1:32am UTC](https://www.ruby-forum.com/t/trouble-installing-ruby-on-rails-mysql-gem-in-windows-xp/179592 "2009-11-30T01:32:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rottenrobbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/cab0a1/32.png) [@rottenrobbie](https://www.ruby-forum.com/u/rottenrobbie)\
**Post date:** [November 30, 2009, 1:32am UTC](https://www.ruby-forum.com/t/trouble-installing-ruby-on-rails-mysql-gem-in-windows-xp/179592/1 "2009-11-30T01:32:24Z")

</div>

I have Ruby On Rails installed okay, but I can’t seem to get the mysql  
gem installed properly.

I have MySQL 5.1 installed and the following

ruby -v  
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

gem -v  
1.3.5

rails -v  
Rails 2.3.5

gem list

\*\*\* LOCAL GEMS \*\*\*

actionmailer (2.3.5)  
actionpack (2.3.5)  
activerecord (2.3.5)  
activeresource (2.3.5)  
activesupport (2.3.5)  
cgi\_multipart\_eof\_fix (2.5.0)  
fxri (0.3.6)  
fxruby (1.6.16)  
gem\_plugin (0.2.3)  
hpricot (0.6.164)  
log4r (1.0.5)  
mongrel (1.1.5)  
mysql (2.8.1)  
ptools (1.1.6)  
rack (1.0.1)  
rails (2.3.5)  
rake (0.8.7, 0.8.1)  
ruby-opengl (0.60.0)  
sqlite3-ruby (1.2.3)  
test-unit (2.0.1)  
win32-api (1.2.1, 1.2.0)  
win32-clipboard (0.4.4)  
win32-dir (0.3.2)  
win32-eventlog (0.5.0)  
win32-file (0.5.5)  
win32-file-stat (1.3.1)  
win32-process (0.5.9)  
win32-sapi (0.1.4)  
win32-sound (0.4.1)  
windows-api (0.2.4)  
windows-pr (0.9.3)

I tried

gem install mysql – --with-mysql-dir=“C:\Program Files\MySQL”

gem install mysql – --with-mysql-dir=“C:\Program Files\MySQL\MySQL  
Server 5.1”

gem install mysql – --with-mysql-dir=“C:\Program Files\MySQL\MySQL  
Server 5.1\bin”

This is the errors I get every time.

Successfully installed mysql-2.8.1-x86-mswin32  
1 gem installed  
Installing ri documentation for mysql-2.8.1-x86-mswin32…

No definition for next\_result

No definition for field\_name

No definition for field\_table

No definition for field\_def

No definition for field\_type

No definition for field\_length

No definition for field\_max\_length

No definition for field\_flags

No definition for field\_decimals

No definition for time\_inspect

No definition for time\_to\_s

No definition for time\_get\_year

No definition for time\_get\_month

No definition for time\_get\_day

No definition for time\_get\_hour

No definition for time\_get\_minute

No definition for time\_get\_second

No definition for time\_get\_neg

No definition for time\_get\_second\_part

No definition for time\_set\_year

No definition for time\_set\_month

No definition for time\_set\_day

No definition for time\_set\_hour

No definition for time\_set\_minute

No definition for time\_set\_second

No definition for time\_set\_neg

No definition for time\_set\_second\_part

No definition for time\_equal

No definition for error\_errno

No definition for error\_sqlstate  
Installing RDoc documentation for mysql-2.8.1-x86-mswin32…

No definition for next\_result

No definition for field\_name

No definition for field\_table

No definition for field\_def

No definition for field\_type

No definition for field\_length

No definition for field\_max\_length

No definition for field\_flags

No definition for field\_decimals

No definition for time\_inspect

No definition for time\_to\_s

No definition for time\_get\_year

No definition for time\_get\_month

No definition for time\_get\_day

No definition for time\_get\_hour

No definition for time\_get\_minute

No definition for time\_get\_second

No definition for time\_get\_neg

No definition for time\_get\_second\_part

No definition for time\_set\_year

No definition for time\_set\_month

No definition for time\_set\_day

No definition for time\_set\_hour

No definition for time\_set\_minute

No definition for time\_set\_second

No definition for time\_set\_neg

No definition for time\_set\_second\_part

No definition for time\_equal

No definition for error\_errno

No definition for error\_sqlstate

Any ideas?

---

<div class="post-metadata">

**Author:** ![rottenrobbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/cab0a1/32.png) [@rottenrobbie](https://www.ruby-forum.com/u/rottenrobbie)\
**Post date:** [November 30, 2009, 7:10pm UTC](https://www.ruby-forum.com/t/trouble-installing-ruby-on-rails-mysql-gem-in-windows-xp/179592/2 "2009-11-30T19:10:23Z")

</div>

Hi,

I get those sometimes and they are “just” documentation related. The gem  
was installed correctly properly. Ignore that and try to use it.

In windows I use instantrails and forget all the pains of all that.  
[http://rubyforge.org/projects/instantrails/](http://rubyforge.org/projects/instantrails/)  
You can update that to the latest rails after installing…

Cheers.

---

<div class="post-metadata">

**Author:** ![rottenrobbie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/cab0a1/32.png) [@rottenrobbie](https://www.ruby-forum.com/u/rottenrobbie)\
**Post date:** [November 30, 2009, 10:47pm UTC](https://www.ruby-forum.com/t/trouble-installing-ruby-on-rails-mysql-gem-in-windows-xp/179592/3 "2009-11-30T22:47:31Z")

</div>

comopasta Gr wrote:

> Hi,
> 
> I get those sometimes and they are “just” documentation related. The gem  
> was installed correctly properly. Ignore that and try to use it.
> 
> In windows I use instantrails and forget all the pains of all that.  
> [http://rubyforge.org/projects/instantrails/](http://rubyforge.org/projects/instantrails/)  
> You can update that to the latest rails after installing…
> 
> Cheers.

Thanks for the response, I don’t get many responses to my posts at least  
not concerning this issue. Yes, I did figure that out and I finally  
managed to get it installed like so.

gem install --no-rdoc --no-ri mysql – --with-mysql-config=“C:\Program  
Files\MySQL\MySQL Server 5.1\my.ini”

Then it would not give me access to my database with a password on root  
so I removed the password and now it seems to work. Now, I just need to  
create another user and figure out the password issue.

I know I could use InstantRails and I do have it on another machine  
though I was kind of leery to do the update as I have heard a lot of  
people have broken their rails installation by performing the update.

In any case, on my current machine I am unable to use InstantRails  
because of a server issue. I am using IIS and Instant rails apache  
server causes problem even after I changed the port number.

So, I decided to just install it the regular way and also I just wanted  
to know how to do it. After getting all this done though I have come to  
the conclusion that Linux is a better platform for ruby. It is  
definitely much quicker. Windows takes for ever to respond to ruby  
commands in the cmd box and after starting the server, it does not want  
to shut down with ctrl-C unless you refresh the localhost:3000 page.

Still, it is a good exercise and I will definitely document how I did  
this so if I have to do it again, I will remember how. It would really  
be nice though if the sqlite and mysql gems were preinstalled. Still, I  
did manage to figure it out.
