# Help with mysql error

**URL:** <https://www.ruby-forum.com/t/help-with-mysql-error/185942>\
**Category:** Rails\
**Created:** [March 29, 2010, 3:01pm UTC](https://www.ruby-forum.com/t/help-with-mysql-error/185942 "2010-03-29T15:01:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![twittwit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8c91f0/32.png) [@twittwit](https://www.ruby-forum.com/u/twittwit)\
**Post date:** [March 29, 2010, 3:01pm UTC](https://www.ruby-forum.com/t/help-with-mysql-error/185942/1 "2010-03-29T15:01:22Z")

</div>

I got the following error.

/Users/bryan/.gem/ruby/1.8/gems/activesupport-2.2.2/lib/active\_support/  
dependencies.rb:442:in `load\_missing\_constant’: uninitialized constant  
MysqlCompat::MysqlRes (NameError)

I tried to do the following :

“sudo env ARCHFLAGS=”-arch x86\_64" gem install mysql"

and

“sudo gem install mysql”

but it doesn’t work. any suggestion as to how to solve this?

---

<div class="post-metadata">

**Author:** ![twittwit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8c91f0/32.png) [@twittwit](https://www.ruby-forum.com/u/twittwit)\
**Post date:** [March 29, 2010, 4:28pm UTC](https://www.ruby-forum.com/t/help-with-mysql-error/185942/2 "2010-03-29T16:28:02Z")

</div>

Quoting twittwit [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> and
> 
> “sudo gem install mysql”
> 
> but it doesn’t work. any suggestion as to how to solve this?

“It doesn’t work” is not very informative. How doesn’t it work, same  
error  
message as before, or the MySQL gem doesn’t install (please give error  
message  
if so). What platform are you on (Linux, Windows, Mac OSX). More  
detail is  
needed to help you.

Jeffrey

---

<div class="post-metadata">

**Author:** ![twittwit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/8c91f0/32.png) [@twittwit](https://www.ruby-forum.com/u/twittwit)\
**Post date:** [April 3, 2010, 10:06am UTC](https://www.ruby-forum.com/t/help-with-mysql-error/185942/3 "2010-04-03T10:06:35Z")

</div>

Hi there

I know it’s something silly but have you tried to include a require  
sentence for MysqlCompat::MysqlRes (I lose a lot of time with a  
‘NameError’ problem like this and it was a missing require

Knd Rgds

Miquel

On Mon, 29 Mar 2010 09:26:45 -0500
