Trouble installing Ruby On Rails mysql gem in Windows XP

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?

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/
You can update that to the latest rails after installing…

Cheers.

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/
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.