# Yet another MySQL issue on WinXP

**URL:** <https://rubytalk.org/t/yet-another-mysql-issue-on-winxp/54705>\
**Category:** ruby-talk\
**Created:** [1 August 2009 13:16 UTC](https://rubytalk.org/t/yet-another-mysql-issue-on-winxp/54705 "2009-08-01T13:16:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mits\_Beucannon](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@Mits\_Beucannon](https://rubytalk.org/u/Mits_Beucannon)\
**Post date:** [1 August 2009 13:16 UTC](https://rubytalk.org/t/yet-another-mysql-issue-on-winxp/54705/1 "2009-08-01T13:16:09Z")

</div>

I know that my questions will NOT be answered even thogh are pretty  
simple for some guru guys like you..

I hope is posted in the correct section..

Like a classic n00b I followed a video tutorial to install ruby, rails,  
gem etc..Is the classic tutorial by Kevin Skoglund..

He teaches it in his MAC so some things are a bit different there..

In a step he installs MySQL and somehow he connects it to Ruby!

I could not even write in CMD mysql -version and get an answer.. Finally  
I did it by reading another topic in the forum..

But I still get error when I try to browse my project..  
"We're sorry, but something went wrong."  
"We've been notified about this issue and we'll take a look at it  
shortly."

I attached the development log..

It says something about sqlite.. Probably it tries to find something  
different than mysql?

How to I make knows that it needs mysql?

I am curious if someone can make a noob like me to get this work!

Good luck!

Attachments:  
[http://www.ruby-forum.com/attachment/3921/log.txt](http://www.ruby-forum.com/attachment/3921/log.txt)

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![James\_Coglan2](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@James\_Coglan2](https://rubytalk.org/u/James_Coglan2)\
**Post date:** [1 August 2009 13:28 UTC](https://rubytalk.org/t/yet-another-mysql-issue-on-winxp/54705/2 "2009-08-01T13:28:28Z")

</div>

> I attached the development log..
> 
> It says something about sqlite.. Probably it tries to find something  
> different than mysql?
> 
> How to I make knows that it needs mysql?

If you're using mysql, you should have the following in your  
config/database.yml:

development:  
&nbsp;&nbsp;adapter: mysql  
&nbsp;&nbsp;server: localhost  
&nbsp;&nbsp;user: [your username]  
&nbsp;&nbsp;password: [your password]  
&nbsp;&nbsp;database: [database name]

Rails uses sqlite3 by default so if you don't have it your app won't start  
properly.

> **···**
>
> --  
> James Coglan  
> [http://jcoglan.com](http://jcoglan.com)

---

<div class="post-metadata">

**Author:** ![Luis\_Lavena1](https://avatars.discourse-cdn.com/v4/letter/l/f08c70/32.png) [@Luis\_Lavena1](https://rubytalk.org/u/Luis_Lavena1)\
**Post date:** [1 August 2009 16:30 UTC](https://rubytalk.org/t/yet-another-mysql-issue-on-winxp/54705/3 "2009-08-01T16:30:06Z")

</div>

Please follow this tutorial:

[http://blog.mmediasys.com/2009/07/06/getting-started-with-rails-and-mysql/](http://blog.mmediasys.com/2009/07/06/getting-started-with-rails-and-mysql/)

has been created for people getting started with Ruby and Rails on  
Windows.

Also, you need to use MySQL 5.0, not 5.1, since the mysql Ruby  
bindings are going to fail, read the post details.

HTH,

> **···**
>
> On Aug 1, 10:16 am, Perdikis Perdikis \<mm...@msn.com\> wrote:
> 
> > I know that my questions will NOT be answered even thogh are pretty  
> > simple for some guru guys like you..
> > 
> > I hope is posted in the correct section..
> > 
> > Like a classic n00b I followed a video tutorial to install ruby, rails,  
> > gem etc..Is the classic tutorial by Kevin Skoglund..
> > 
> > He teaches it in his MAC so some things are a bit different there..
> > 
> > In a step he installs MySQL and somehow he connects it to Ruby!
> > 
> > I could not even write in CMD mysql -version and get an answer.. Finally  
> > I did it by reading another topic in the forum..
> > 
> > But I still get error when I try to browse my project..  
> > "We're sorry, but something went wrong."  
> > "We've been notified about this issue and we'll take a look at it  
> > shortly."
> > 
> > I attached the development log..
> > 
> > It says something about sqlite.. Probably it tries to find something  
> > different than mysql?
> > 
> > How to I make knows that it needs mysql?
> > 
> > I am curious if someone can make a noob like me to get this work!
> 
> --  
> Luis Lavena

---

<div class="post-metadata">

**Author:** ![Mits\_Beucannon](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@Mits\_Beucannon](https://rubytalk.org/u/Mits_Beucannon)\
**Post date:** [1 August 2009 14:00 UTC](https://rubytalk.org/t/yet-another-mysql-issue-on-winxp/54705/4 "2009-08-01T14:00:09Z")

</div>

I just recreate a new my\_app project like this..

rails my\_app -d mysql

So in the database.yml was those..

# MySQL. Versions 4.1 and 5.0 are recommended.

> **···**
>
> #  
> # Install the MySQL driver:  
> # gem install mysql  
> # On Mac OS X:  
> # sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql  
> # On Mac OS X Leopard:  
> # sudo env ARCHFLAGS="-arch i386" gem install mysql --  
> --with-mysql-config=/usr/local/mysql/bin/mysql\_config  
> # This sets the ARCHFLAGS environment variable to your native  
> architecture  
> # On Windows:  
> # gem install mysql  
> # Choose the win32 build.  
> # Install MySQL and put its /bin directory on your path.  
> #  
> # And be sure to use new-style password hashing:  
> # [http://dev.mysql.com/doc/refman/5.0/en/old-client.html](http://dev.mysql.com/doc/refman/5.0/en/old-client.html)  
> development:  
> &nbsp;&nbsp;adapter: mysql  
> &nbsp;&nbsp;encoding: utf8  
> &nbsp;&nbsp;reconnect: false  
> &nbsp;&nbsp;database: my\_app\_dev  
> &nbsp;&nbsp;pool: 5  
> &nbsp;&nbsp;username: root  
> &nbsp;&nbsp;password:  
> &nbsp;&nbsp;host: localhost
> 
> # Warning: The database defined as "test" will be erased and  
> # re-generated from your development database when you run "rake".  
> # Do not set this db to the same as development or production.  
> test:  
> &nbsp;&nbsp;adapter: mysql  
> &nbsp;&nbsp;encoding: utf8  
> &nbsp;&nbsp;reconnect: false  
> &nbsp;&nbsp;database: my\_app\_test  
> &nbsp;&nbsp;pool: 5  
> &nbsp;&nbsp;username: root  
> &nbsp;&nbsp;password:  
> &nbsp;&nbsp;host: localhost
> 
> production:  
> &nbsp;&nbsp;adapter: mysql  
> &nbsp;&nbsp;encoding: utf8  
> &nbsp;&nbsp;reconnect: false  
> &nbsp;&nbsp;database: my\_app\_production  
> &nbsp;&nbsp;pool: 5  
> &nbsp;&nbsp;username: root  
> &nbsp;&nbsp;password:  
> &nbsp;&nbsp;host: localhost
> 
> I just set a password and the database I made it "test"..
> 
> I think I am missing something on the comments that says about mysql  
> installation on windows..
> 
> "#Install MySQL and put its /bin directory on your path."
> 
> It means to put the "D:\Program Files\MySQL\MySQL Server 5.1\bin" in  
> what path?
> 
> THanks!
> 
> PS I attached a new log that may helps!
> 
> Attachments:  
> [http://www.ruby-forum.com/attachment/3922/log2.txt](http://www.ruby-forum.com/attachment/3922/log2.txt)
> 
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Mits\_Beucannon](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@Mits\_Beucannon](https://rubytalk.org/u/Mits_Beucannon)\
**Post date:** [1 August 2009 16:45 UTC](https://rubytalk.org/t/yet-another-mysql-issue-on-winxp/54705/5 "2009-08-01T16:45:41Z")

</div>

Thanx man for the help!

I m going right now to read it!

Thanx again so much!

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Mits\_Beucannon](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@Mits\_Beucannon](https://rubytalk.org/u/Mits_Beucannon)\
**Post date:** [1 August 2009 14:46 UTC](https://rubytalk.org/t/yet-another-mysql-issue-on-winxp/54705/6 "2009-08-01T14:46:04Z")

</div>

Let me notice some things that may are not right..

THose are my install dirs..

D:\Ruby  
D:\Gems  
D:\Sites  
D:\Program Files\MySQL

Thanx!

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Mits\_Beucannon](https://avatars.discourse-cdn.com/v4/letter/m/65b543/32.png) [@Mits\_Beucannon](https://rubytalk.org/u/Mits_Beucannon)\
**Post date:** [1 August 2009 18:18 UTC](https://rubytalk.org/t/yet-another-mysql-issue-on-winxp/54705/7 "2009-08-01T18:18:56Z")

</div>

Hello again!

I just wanted to say thank you one more time!

I followed the link and everything was so clear! I managed to get it  
work!

Thank you!

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
