# Need help getting environment setup

**URL:** <https://www.ruby-forum.com/t/need-help-getting-environment-setup/188093>\
**Category:** Rails\
**Created:** [May 5, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/need-help-getting-environment-setup/188093 "2010-05-05T16:57:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bishopneo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bishopneo](https://www.ruby-forum.com/u/bishopneo)\
**Post date:** [May 5, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/need-help-getting-environment-setup/188093/1 "2010-05-05T16:57:08Z")

</div>

Greetings all.

Full disclosure, I am not a ruby developer by choice. I’ve been brought  
onto a project to do some front-end work however I am having major  
problems getting my environment up and running. (BTW, I am liking ruby  
so I might just learn it anyway).

I’m building on a MBP with Snow Leopard. I’ve installed XCode from the  
disk that comes with the mac. I’ve updated ruby, installed rails and  
all the needed gems. I have the 64 bit version of MySQL installed.

Here’s where the trouble starts. When trying to do rake db:migrate it  
creates the tables but then aborts when trying to do an insert with this  
error:

– create\_table(:time\_dimension)  
-\> 0.1056s  
INSERT time\_dimension(time\_key, `year`, `month`, `day`, day\_of\_week,  
weekend, quarter) VALUES(20080101, 2008, 1, 1, ‘Tuesday’, false, 1)  
rake aborted!  
Could not load driver (uninitialized constant Mysql::Driver)

The people I know that develop in ruby sent me here. I could really use  
a hand on this one. Anything anyone needs to know just tell me what it  
is and I’ll post it.

Thanks in advance.

-anthony

---

<div class="post-metadata">

**Author:** ![bishopneo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bishopneo](https://www.ruby-forum.com/u/bishopneo)\
**Post date:** [May 5, 2010, 5:04pm UTC](https://www.ruby-forum.com/t/need-help-getting-environment-setup/188093/2 "2010-05-05T17:04:07Z")

</div>

Have you installed libmysql-ruby ??

---

<div class="post-metadata">

**Author:** ![bishopneo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bishopneo](https://www.ruby-forum.com/u/bishopneo)\
**Post date:** [May 5, 2010, 5:15pm UTC](https://www.ruby-forum.com/t/need-help-getting-environment-setup/188093/3 "2010-05-05T17:15:40Z")

</div>

Ants P. wrote:

> Have you installed libmysql-ruby ??

No, I haven’t. Running ‘gem install libmysql-ruby’ fails with /ERROR:  
could not find gem libmysql-ruby locally or in a repository/.

A quick search in google doesn’t give me any source and only mentions  
ubuntu and other linux distros. Is there a trick to installing this?

Oh, I’m running ruby 1.8.7 with rails 2.3.5 if that makes a difference.

-anthony

---

<div class="post-metadata">

**Author:** ![bishopneo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bishopneo](https://www.ruby-forum.com/u/bishopneo)\
**Post date:** [May 5, 2010, 5:24pm UTC](https://www.ruby-forum.com/t/need-help-getting-environment-setup/188093/4 "2010-05-05T17:24:02Z")

</div>

I don’t use mac so I don’t know what your package manager is like. On  
Linux, Ubuntu, it’s in my package installer.

[http://www.mysql.com/products/connector/](http://www.mysql.com/products/connector/) has ruby drivers but how to  
install  
on a Mac, I have no idea.

google “mysql drivers ruby” you may find somthing there.

I’m sorry.

---

<div class="post-metadata">

**Author:** ![bishopneo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bishopneo](https://www.ruby-forum.com/u/bishopneo)\
**Post date:** [May 5, 2010, 5:29pm UTC](https://www.ruby-forum.com/t/need-help-getting-environment-setup/188093/5 "2010-05-05T17:29:53Z")

</div>

I donno if adding this comment would make sense here. But anyways  
thought of  
sharing with you.

If you are using Ruby 1.8.x, then make sure that you install 2.7 version  
of  
the libmysql-ruby library. The latest version of mysql/ruby library  
(2.8)  
corresponds to Ruby 1.9.x and it gives problem like ‘Virtual Timer  
Expired’  
error while running rake db:migrate.

Thanks.

---

<div class="post-metadata">

**Author:** ![bishopneo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bishopneo](https://www.ruby-forum.com/u/bishopneo)\
**Post date:** [May 5, 2010, 5:32pm UTC](https://www.ruby-forum.com/t/need-help-getting-environment-setup/188093/6 "2010-05-05T17:32:49Z")

</div>

I think you have to do,

sudo gem install mysql -v=2.7

I have blogged regarding the same here.

> **[Fix for ‘rake db:migrate’, Virtual timer expired issue](https://theflashesofinsight.wordpress.com/2010/05/03/fix-for-rake-dbmigrate-virtual-timer-expired-issue/)**
>
> Hey Guys, I am sincerely apologize for causing this inconvenience. This article has been moved the following location: As I was nearing my 100th blog, I thought its good time for me to move all my …

Thanks.

---

<div class="post-metadata">

**Author:** ![bishopneo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bishopneo](https://www.ruby-forum.com/u/bishopneo)\
**Post date:** [May 5, 2010, 5:37pm UTC](https://www.ruby-forum.com/t/need-help-getting-environment-setup/188093/7 "2010-05-05T17:37:50Z")

</div>

v4 forums wrote:

> I think you have to do,
> 
> sudo gem install mysql -v=2.7
> 
> I have blogged regarding the same here.
> 
> [Fix for ‘rake db:migrate’, Virtual timer expired issue | Flashes of Insight](http://theflashesofinsight.wordpress.com/2010/05/03/fix-for-rake-dbmigrate-virtual-timer-expired-issue/)
> 
> Thanks.

Tried that but the rake db:migrate still failed with the same error, it  
can’t do an INSERT.

---

<div class="post-metadata">

**Author:** ![bishopneo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bishopneo](https://www.ruby-forum.com/u/bishopneo)\
**Post date:** [May 6, 2010, 5:17pm UTC](https://www.ruby-forum.com/t/need-help-getting-environment-setup/188093/8 "2010-05-06T17:17:42Z")

</div>

Jason White wrote:

> I used the setup guide at  
> [http://www.robbyonrails.com/articles/2010/02/08/installing-ruby-on-rails-passenger-postgresql-mysql-oh-my-zsh-on-snow-leopard-fourth-edition](http://www.robbyonrails.com/articles/2010/02/08/installing-ruby-on-rails-passenger-postgresql-mysql-oh-my-zsh-on-snow-leopard-fourth-edition)
> 
> It got me up and running, maybe you can find a missing step.
> 
> Sent from my iPhone
> 
> On May 5, 2010, at 10:37 AM, Anthony D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

I went through this step by step, and it still fails at the exact same  
place with the exact same error.

It has to be something simple that I’m missing but I’ve gone over this 5  
times now and it’s getting frustrating.

---

<div class="post-metadata">

**Author:** ![bishopneo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/df705f/32.png) [@bishopneo](https://www.ruby-forum.com/u/bishopneo)\
**Post date:** [May 6, 2010, 6:07am UTC](https://www.ruby-forum.com/t/need-help-getting-environment-setup/188093/9 "2010-05-06T06:07:24Z")

</div>

I used the setup guide at  
[http://www.robbyonrails.com/articles/2010/02/08/installing-ruby-on-rails-passenger-postgresql-mysql-oh-my-zsh-on-snow-leopard-fourth-edition](http://www.robbyonrails.com/articles/2010/02/08/installing-ruby-on-rails-passenger-postgresql-mysql-oh-my-zsh-on-snow-leopard-fourth-edition)

It got me up and running, maybe you can find a missing step.

Sent from my iPhone

On May 5, 2010, at 10:37 AM, Anthony D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
