Rick Denatale wrote:
> 
> This is for an OSX system, some of the details like socket: might be
> different on Windows.
> 
> For a new Rails project you can override the default by using the -d
> mysql option on the rails command.  The way I got the above
> database.yml file was by entering
> 
> $rails -d mysql temp
> 

> --
> Rick DeNatale
> 
> My blog on Ruby
> http://talklikeaduck.denhaven2.com/

Rick,

Huge thanks for your post.

There's a lot of erroneous information which has been extremely 
misleading on this issue. For the benefit of others who are having 
FURTHER problems installing the MySQL gem on their "OSX" systems, we 
should clarify a few other fine points. OSX is not OSX is not OSX in the 
case of installing this component.

Many other people are finding it seemingly impossible to install the 
MySQL gem "on OSX." What they're doing is abiding by instructions for 
earlier versions of OSX, which do not apply to the pre-bundled RoR 
installation on Leopard.

In other words, folks are reading to install this gem with:

gem install mysql

This won't work in recent versions of OSX such as Mac OS X 10.6.2 
(10C540) -- which happens to be my version. You find so many posts 
indicating this is the way to install (without caveat), that you can 
easily be trapped into thinking this is supposed to work -- while it 
doesn't.

Your post helped me resolve this. I first thought I had to have the gem 
installed before building a project; but finally after yet another 
failed install, I did try to execute your line:

rails myApp -d mysql

Hmmm. I got a project (somewhat surprisingly). I thought then that maybe 
the XCode environment didn't bother to check dependencies (which 
probably still is the case)... and while I was ruminating on that, there 
were the instructions, staring me in the face!

:-)

Funny, right in the database.yml file it says, that on Mac OSX 
*LEOPARD*, the gem install instruction is:

"sudo env ARCHFLAGS="-arch i386" gem install mysql -- 
--with-mysql-config=/usr/local/mysql/bin/mysql_config"

Now, that's one line between the quotes (best perhaps to copy it form 
your .yml file and paste it into your console)... and bingo... the 
impossible install went perfectly.

Note that I DID find this instruction in another post, but that several 
permutations of the necessary instruction failed because the user-agent 
hacked the expression.

My advice to others who are suffering the same difficulties then 
installing the mysql gem to LEOPARD is, just (run your "rails myApp -d 
mysql" command and...) read the comment in the top of the .yml file and 
copy it into your console.
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to