A collection of computer systems and programming tips that you may find useful.
Brought to you by Craic Computing LLC, a bioinformatics consulting company.

Monday, November 24, 2008

Installing Rails 2.2 on Mac OS X - MySQL problem

Rails 2.2 is out and you want to install it - but you may run into this issue on Mac OS X.

1: Make sure you have upgraded to rubygems 1.3.1
$ sudo gem update --system

If that barfs try this which does the same thing a different way:
$ sudo gem install rubygems-update
$ sudo update_rubygems

2: Install Rails
This should install just fine
$ sudo gem install rails

3: One important change in 2.2 is that the Mysql database driver is no longer bundled and you have to install yourself. But the obvious command may well fail like this:

$ sudo gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.

The issue is that the gem needs more information about your MySQL installation, so do this instead:

$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions. This could take a while...
Successfully installed mysql-2.7
1 gem installed

4: That looks good but you may not be out of the woods yet... I got this when I tried a rake db:migrate

$ rake db:migrate
(in /Users/jones/Documents/myapp)
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
dlsym(0x1c71570, Init_mysql): symbol not found - /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle

After some poking around I found reference to the version of mysql that is installed.

I installed mine as the packaged disk image from mysql.com. For Mac OS X 10.5 you have the choice of these two:

Both work fine on my MacBook but the mysql gem wants the '_x86' version, not the '_x86_64'

Look in /usr/local to see which you have symlinked in:

$ ls -l /usr/local
lrwxr-xr-x 1 root wheel 24 Nov 24 09:35 mysql -> mysql-5.0.67-osx10.5-x86

Install the correct version, reinstall the gem just to be safe, and try your rake again - it should be fine!


If you do have the same issue and install the non _64 version on top of the _64 one then mysql will NOT copy over your data files. To fix this:

1: Shut down MySQL
2: In the new (non _64) version
$ sudo mv data data.bak
$ sudo cp -pr ../mysql-5.0.67-osx10.5-x86_64/data .

3: Start up MySQL


Unknown said...

You are a life saver. Cheers for this!

fguillen said...

For me does not work:
$ sudo update-rubygems

$ sudo update_rubygems


Doow said...

Nice - this finally saved my day.

Thanks thanks

o on the web said...

I luv u ... lol

Unknown said...

Thank you!

Unknown said...
This comment has been removed by the author.
Unknown said...

Thank's !
That's a great help for me.

KedarsThoughtsWork said...

Yes, that's true. This was of immense help. Thank you! Who would have known mysql gem needs x86 and not x86_64?

BTW, does it mean that I have to run mysqld in 32 bit to run with rails?

gomez said...

Thank a lot for the mysql install hint!!!

Have a long Life


Unknown said...

AWESOME. Thanks so much :)

Unknown said...

Man, thank you so much. I tried so many different suggestions, but only yours works. You rock! :-)

Amy Unruh said...

thanks so much!

James Tuttle said...

you are my hero thanks so much what a nightmare this was!

Jeremy Roush said...

Much thanks.

Anonymous said...
This comment has been removed by a blog administrator.
Gordon Yeong said...

Sorry, I am not having much luck.
"$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions. This could take a while...
Successfully installed mysql-2.7
1 gem installed"

doesn't work.
When i did that on my snow leopard os x, i got more errors as follows:

gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
WARNING: Installing to ~/.gem since /opt/local/lib/ruby/gems/1.8 and
/opt/local/bin aren't both writable.
WARNING: You don't have /Users/anexiole/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
Building native extensions. This could take a while...
Successfully installed mysql-2.8.1
1 gem installed
Installing ri documentation for mysql-2.8.1...

No definition for next_result

No definition for field_name

No definition for field_table


Unknown said...

This whole information is absolutely interesting. i like this blog because is easily understandable, and this is invaluable to the readers.I think Os x is really great.
buy viagra

Chapunk Brinkka said...

Erectile Dysfunction FAQ's

Impotence, or penile erectile dysfunction, in men is not as rare as one would think it is.
In fact, one out of ten men around the world is affected by this condition. It is not exclusive to old men either. Impotence is caused not just by physical factors,
but mental factors as well.
Exercising on a regular basis and eating healthy food will increase your ability to sustain prolonged physical effort and we all know that sex is effort.
Smoking, frequently drinking large quantities of alcohol, taking recreational drugs and lack of exercising will sap your stamina and also slow down the flow of blood.
Penis exercises can be used for maintaining fitness, preventing or controlling premature ejaculation and increasing the length and girth of the penis.
by penis enlargement pills you can overcome these problems and not only that you can also enlarge, extend also to strengthen your penis and premature ejaculation will not exist anymore for you.
visit http://www.factspenisenlargement.com for more info.

Unknown said...

For men who want bigger, harder, longer-lasting erections, there's now VigRX Plus™, a fresh twist on the already popular VigRX™, but designed to further enhance men's sexual functioning with the addition of three exciting new ingredients: Damiana, Tribulus, and Bioperin. Doctor endorsed and rated #1 for results by clients of penis enlargement consumers. rated two penis pills is vimax. if you find about male enhancement this products is the best and proven to work, there products have money-back guarantee in effectiveness and result.

Unknown said...

Costa Rica Tours
Tours Costa Rica

Maria said...

BTW, does it mean that I have to run mysqld in 32 bit to run with rails.
mariah carey perfume
discount perfumes

kakkiku said...

I find the articles are interesting and worth to read

mobil keluarga ideal terbaik indonesia|cheap fax machines

pedro velasquez said...

Chef from opscode.com is a suite of tools fordominical costa rica tours managing computing infrastructure, from spinning up new nodes to installing Ruby gems to any custom operation you care to code up. It gets great reviews from those who manage numbers of unix (and other) systems and it has support for Amazon AWS and other cloud vendors baked right in.

Unknown said...

Nice post!! Thanks for sharing!!!
Viagra Generico

jelish said...

The Louboutin 2011 is planned using the ladies. offered the fact that pumps was born, the ladies lifestyle turn into colorful. The christian Louboutin 2011 Pumps
will be the god's masterwork. Who invited the Christian Louboutin Wedges ? Seldom people knew, but I think each and every and every lady will be grateful for him. between the countless pumps,the Christian Louboutin Shoes
could be probably the most exceptional ones. The stylish pattern, the delicate design all mold the ladies perfect leg profile. Flowers inside the spring of 2011 creeping, up from frizzy hair to outfits hold on to footwear, have experienced a brilliant up. on this type of the glamor, spring and summer time flowers now here. Romance is really a woman's mood, exquisite flowers just appropriate of expression within our gestures, the woman, how can we not adore the romantic temperament to make certain which they distributed the flowers do? 2011 flowers bloom will get satisfaction from numerous poses! The Christian Louboutin New Sandalsalso can adds the hright in the ladies, it hold shock toward short lady. especially the red-colored lone in the louboutin heels, beauty and sexy, different ladies are crazy. The red-colored sole, the earliest attribute in the Sale Louboutin stroe.

jelish said...

Louboutin Pumps put together in 1992,France however it quickly grew to become an international famous brand.Louboutin trademark glossy red-colored soles give an immediate stamp of favor excellence.The designer's ethos would be to "make footwear which are like jewels" and every unique design demonstrates unequalled quality as well as an innate sultriness.Ladies are in love with Louboutin footwear.If you would like keep your same pace using the trend.Louboutin Slingback might be your very best choice.Enjoy free freight,quick delivery,timely delivery,7-12 working days delivery for your door!Don't miss the louboutins shoes.

abercrombiefitch said...

Be fast to browse the newest styles and lots of affordable outfits and Nike oxygen Max and women's merchandise is not an daily affair, for that reason that in the stress of modern day time girls ordinarily do not possess a complete great offer time and vitality to go buying by means of countless many style malls, and look at special fees will make you exhausted, so which you can acquire a satisfactory goods, call up for to devote lots of time, the show up of on collection buying significantly minimizing the inconvenience of this, now you not just can every one of the sudden go to to lots of goods Nike Air Max Shoes .

Unknown said...

Nice post! Thanks for sharing!
Comprare Viagra

Anonymous said...

I like football, prefer the beautiful and stylish football shoes to introduce New nike soccer shoes.Prefer the blackout nike vapor

Frank said...

Loving your blog, awesome tips on blog you have here. I
would just like to ask you some questions privately, mind real player 11,IDM Free Download,function venues geelong,la Fitness locations,la Fitness

Yuesir said...

black boots

Chocolate boots

sand boots

Chestnut boots

gray boots

pink boots

grey boots
pink boots

Black Ugg Boots

Chestnut Ugg


Chocolate Ugg


Grey Ugg Boots

Ugg Boots On Sale

Ricky Martin said...

This site is excellent and so is how the subject matter was explained. I also like some of the comments too.Waiting for next post.

buy vicodin online

Imran said...

Thanks for sharing this great article! Lingerie

Muhammad Alexander said...

This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.

the best seo company

Isabella Kaun said...

Estoy de acuerdo con este comentario películas pron salir mal impacto en la generación de jóvenes generation.if jóvenes les gustan estas cosas, entonces esa nación no conseguir sus objetivos y no conseguir el desarrollo de su país

maquinas de coser
maquinas de bordar
reparacion maquinas de coser

Admin said...

Now a days there are minimum users who used Mac for personal purpose.I totally sure about that because i also researched on it.

Facebook Development

Isabella Kaun said...

Yes, the post is very interesting and I really like.
doctor ratings and reviews
reviews by patients
find doctor list

saim said...

I just want to thank you for sharing your information and your website, this is simple, but good article I have ever seen, I like it, and I learned something today! Thanks!

find doctor list

Chris Suja said...

I always enjoy reading such posts which provide knowledge based information like this blog. Thanks for sharing it with us Generic Nexium Online .

Kyle Grando said...

Good share, great article, very useful for us. keep posting kind of blogs in the future. thanks for sharing post. its a really useful list. good work.

Indigo Hotel DALLAS

Mohtasham said...

good informative blog, I always read your blogs whenever I get free. Keep on updating it with new stuff, I love your work. latest sms l how to make chicken biryani l tandoori chicken recipe l home exercises

amhash said...

I will try my best to do like that. That's a called a creative thinking. Nice post dude. Share some more like that.
Affordable Logo Design

Unknown said...

I read and walked for miles at night along the beach, writing bad blank verse and searching endlessly for someone wonderful who would step out of the darkness and change my life. It never crossed my mind that that person could be me.
business electricity tariffs

Unknown said...

Site's character and a great color match .. Meme estetiğiI will recommend your site to the other platforms.

Unknown said...

Thank you! Cheap Nike NFL Jerseys
Cheap NBA Jerseys

Anonymous said...

Yes, it is true. It is a great help. Thank you! Who will know mysql gem need x86 and not x86_64?
By the way, this means that I must run in 32 bit mysqld running rails?
cheap nfl football jerseys

Unknown said...

Really i appreciate the effort you made to share the knowledge.I would like to see extra posts like this.This is nice post which I was awaiting for such an article and I have gained some useful information from this site. Thanks for sharing this information.mirza maqbool | Maqbool mirza

Unknown said...

very nice post, i certainly love this website, keep on it.cabs in w2 | cab w2 | w2 taxis

Unknown said...

I really like and appreciate your article post.Really looking forward to read more. Really Cool.taxis in w2 | minicab to airport | airport drop w2

dolinna said...

Congratulations for this wonderful reading article. I found it very informative and interesting too, I think you are a brilliant writer. I have bookmarked your blog and will return in the future. I want to encourage you to continue that marvelous work, have a great daytime!I am a china tour lover,You can learn more: China travel | private China tours | China Tourist Attractions

Liza said...

Really appreciate your professional approach. These are pieces of very useful information that will be of great use for me in future.

Mumbai Escort

Unknown said...

Very nice post. I just stumbled upon your blog and wanted to say that I have really enjoyed browsing your blog posts. Nehru jacket

jessica kapoor said...

Great to comment on this post really cool and informative in this blog...

Jesika Goa Escort Independent Goa Escorts Escorts in Goa Independent Escorts in Goa

Ritu Singh Independent Goa Escorts Escorts Goa Escorts in Goa Independent Escorts in Goa

Unknown said...

Can I simply just say what a relief to uncover somebody that really understands what they are discussing on the net. You actually realize how to bring an issue to light and make it important. More people should check this out and understand this side of your story. I was surprised that you aren't more popular because you surely have the gift. manfaat glutatgione

Unknown said...

- Obat Pembesar Penis
- Obat Perangsang Wanita
- Toko Alat Bantu Sex
- Jual Obat Bius Wanita

sun light said...

I Saw Your Website Carefully. Thanks For Create Such Kind of Informative Website. Your All Content Is Relevant To Your Subject. I Say Keep It Continue, Because Your Website And Subject Is Meaningful For The Users. I Have Recommended Your Website With My Friends Also.
I Am Ritu Sharma. I Deal In Mumbai Escorts Service . I Am Very Hot And Sexy. I Have Five Years’ Experience. That’s why I Understand the Each Personal Needs of My Every Client. My Service Charge Is Low And Service Is Super. You Can Avail My VIP Escorts Service At Your Home Or In Hotel. I Am Comfortable To Provide Escorts Service In Local And Outside Also.
Visit http://www.escortservicemumbai.net/ Call +91- 9OO4OO9481
Visit The Links Below And Have A Look At My Various Mumbai Escort Services-
Mumbai Escorts
Mumbai Call Girls
Juhu Escorts
Andheri Escorts
Bandra Escorts
Mumbai Escorts In Vile Parle
Mumbai Escorts In Colaba

sweetheart said...

I Am Thankful To You For Create Such Kind Of Informative Website. Really It Is Useful According Your Current Topic. I Suggest To Keep This Continue For Those People, Who Are Looking For Such Kind Of Niche. After See Your Niche I Have Recommended Your Website With My Friends Also.
My name is Arpita Jain. I run my independent Mumbai Escorts Service. I am an independent Mumbai escort girl. My service charge is low according the current market price. My service is super, because I know very well the personal requirement of my each customer. I am comfortable to provide my Mumbai Escorts Service at your home or in Hotel. Visit- http://www.arpitajain.org/ Call- +91 9OO4458359
Visit The Links Below And Have A Look At My Various Mumbai Escort Services-
Mumbai Escorts Service

Juhu Escorts
Mumbai Call Girls
Escort Service In Mumbai
Andheri Escorts
Bandra Escorts

Escort Service said...

If you are available at Goa Call Girls, Goa with high class call girls 5 star hotel photos contact us, you can book Top Model Independent Escorts in Goa.escort in goa

Female Escort Service in Gugaon said...

Are you looking for escort service and you are in Gurugram? Well we have a five star hotel facility and better sexy girls and we provide the lowest rate of convenience. Female Escort Service in Gugaon

Satta King -Satta-King said...

Very nice information, it is valuable and useful to so many people. Thanks for sharing this blog.
If Want Play online Satta King Game Click SattaKing :-

Archive of Tips