# Trouble Running my new controller

**URL:** <https://www.ruby-forum.com/t/trouble-running-my-new-controller/55908>\
**Category:** Rails\
**Created:** [March 25, 2006, 2:12am UTC](https://www.ruby-forum.com/t/trouble-running-my-new-controller/55908 "2006-03-25T02:12:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stewartm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@stewartm](https://www.ruby-forum.com/u/stewartm)\
**Post date:** [March 25, 2006, 2:12am UTC](https://www.ruby-forum.com/t/trouble-running-my-new-controller/55908/1 "2006-03-25T02:12:52Z")

</div>

I’ve got Apache2, MySql5 installed on fc5, and I got RoR installed and  
set-up the database.yml file with correct  
username/password, etc – but RoR keeps complaining that it keeps losing  
connection;

```auto
Mysql::Error: Lost connection to MySQL server during query: SELECT
COUNT(*) FROM categories
```

What is wrong? Why does it lose connection to MySQL server?

---

<div class="post-metadata">

**Author:** ![stewartm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@stewartm](https://www.ruby-forum.com/u/stewartm)\
**Post date:** [March 25, 2006, 2:39am UTC](https://www.ruby-forum.com/t/trouble-running-my-new-controller/55908/2 "2006-03-25T02:39:08Z")

</div>

Maybe your need to upgrade your RoR MySQL client.  
I don’t remember the details but I did it just after having problems  
connection to MySQL from RoR and installed MySQL/Ruby with gem

Try gem install mysql

---

<div class="post-metadata">

**Author:** ![stewartm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@stewartm](https://www.ruby-forum.com/u/stewartm)\
**Post date:** [March 25, 2006, 2:54am UTC](https://www.ruby-forum.com/t/trouble-running-my-new-controller/55908/3 "2006-03-25T02:54:20Z")

</div>

Guest wrote:

> Maybe your need to upgrade your RoR MySQL client.  
> I don’t remember the details but I did it just after having problems  
> connection to MySQL from RoR and installed MySQL/Ruby with gem
> 
> Try gem install mysql

thanks for your quick reply all this stuff seems a little less  
impossible when you got good forums…

ok sigh… every step in setting this up seems to be met with problems  
when i run the command your talking about i get the folling vauge error

[error]  
Could not create Makefile due to some reason, probably lack of  
necessary libraries and/or headers. Check the mkmf.log file for more  
details. You may need configuration options.  
[/error]

I dont understand how there could be a problem with the make file as i  
was about to install ruby and ruby gems with no problems

---

<div class="post-metadata">

**Author:** ![stewartm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@stewartm](https://www.ruby-forum.com/u/stewartm)\
**Post date:** [March 25, 2006, 3:49am UTC](https://www.ruby-forum.com/t/trouble-running-my-new-controller/55908/4 "2006-03-25T03:49:33Z")

</div>

Guest wrote:

> I had the same problem too…
> 
> Have a look here : [http://www.ocsforums.com/showthread.php?t=132](http://www.ocsforums.com/showthread.php?t=132)
> 
> I just removed the -mtune option (if I remember well)

Fantastic it worked!

Thank you so much for your feedback it was most helpful…

Note: in that link you just posted i did not edit the file i just called  
the command the builds the make file and restarted the mysql server.  
Back in business now. Thanks so much again!!!

---

<div class="post-metadata">

**Author:** ![stewartm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a9adbd/32.png) [@stewartm](https://www.ruby-forum.com/u/stewartm)\
**Post date:** [March 25, 2006, 3:08am UTC](https://www.ruby-forum.com/t/trouble-running-my-new-controller/55908/5 "2006-03-25T03:08:22Z")

</div>

I had the same problem too…

Have a look here : [http://www.ocsforums.com/showthread.php?t=132](http://www.ocsforums.com/showthread.php?t=132)

I just removed the -mtune option (if I remember well)
