Easy way to make Rails use MySQL on Windows?

I set up Rails from scratch using the methods on:

http://rubyonrails.org/download

and also:

gem install sqlite3-ruby
download sqlite3.dll into c:\ruby\bin
change config/database.yml adapter lines for dev, test, prod all to
sqlite3

so sqlite3 can be used now…

but what if i also installed MySQL on c:\Program Files

Is there an easy way to make Rails work with MySQL?

if i use

gem install mysql

there will be lots of errors saying

No definition for next_result

Yes, gem install mysql is needed.
But, I’m not sure what do you mean lots of errors.
Maybe you should post your errors here.

Jette Chan wrote:

Yes, gem install mysql is needed.
But, I’m not sure what do you mean lots of errors.
Maybe you should post your errors here.

sure, a sample run is:

C:\Software Projects\ror\shov6>gem install mysql
Successfully installed mysql-2.8.1-x86-mingw32
1 gem installed
Installing ri documentation for mysql-2.8.1-x86-mingw32…

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

OK. Now I know…
I thought t you can see “1 gem installed”
So, it means you’ve already finished install mysql gem now.
And the following errors come from when installation the documentation.

Actually you already can use this gem now.

Jette Chan wrote:

OK. Now I know…
I thought t you can see “1 gem installed”
So, it means you’ve already finished install mysql gem now.
And the following errors come from when installation the documentation.

Actually you already can use this gem now.

but when i use

http://localhost:3000

and click on the

About your application’s environment

the box will say error…

right now MySQL is a command line app, does it need to be run as a
background process?

and i guess when i create the project, it is better to use

rails myapp -d mysql

?

On May 13, 11:53 am, Jian L. [email protected] wrote:

but when i use

http://localhost:3000

and click on the

About your application’s environment

the box will say error…

What error ?

right now MySQL is a command line app, does it need to be run as a
background process?

When you installed mysql it should have installed some graphical
utilities that you can use to start up the server process (it may have
already started it for you). You’ll also need to edit your
database.yml to refer to the instance of mysql on your machine (it may
not be a bad idea to look at a rails app created with -d mysql if
you’re not familiar with how this looks)

Fred