Need help getting environment setup

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

Have you installed libmysql-ruby ??

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

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/ 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.

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.

I think you have to do,

sudo gem install mysql -v=2.7

I have blogged regarding the same here.

Thanks.

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

Thanks.

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

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

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. [email protected]

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.

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

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. [email protected]