Books I've read or currently reading

Smartphones I like

What is a smartphone and what can you do with it?

Blog powered by Typepad

« Ruby on Rails Book in a Flat World | Main | Thoughts on Apple's Intel strategy »

June 02, 2005

Comments

Trey

Awesome. This worked perfectly. Thanks for the post.

Robin

Worked perfect for me using tiger 10.4.1 Thanks!

Stephen

Even a novice like me could make it work! Thanks.

Stefano Bertolo

hi Jose,

thanks for your helpful tips.

Up to step 8 everything was peachy but then I got this:

stefano-bertolos-power-mac-g5:~ stefano$ sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql
Attempting local installation of 'mysql'
Local gem file not found: mysql*.gem
Attempting remote installation of 'mysql'
ERROR: While executing gem ... (OpenURI::HTTPError)
404 Not Found

Could you explain what I did wrong?

Thanks a bunch in advance,

Stefano

Stefano Bertolo

Never mind: I tried a few hours later and it just worked. Go figure.
Thanks again for the excellent tips!

julian

Been trying to get Ruby on Rails all working and lovely. Followed your instructions, and I managed to break my previous version of MySQL (because my Rolling with Ruby on Rails cookbook didn't seem to work properly) Ruby on Rails now works, MySQL works, but it's doing something weird. It keeps coming up with an Action Controller: Exception caught page with "No database selected: SHOW FIELDS FROM recipes" in the body. Any ideas? I'm going totally insane. Tried to get this working for the last two days.

Julian

Okay got it working - just downloaded compiled and make installed the MySQL/Ruby API. Works now.

Cheekygeek

Wow am I frustrated. I apparently have two versions of MySQL installed but don't know what to do to make things right. When I type in the Terminal: which mysql it returns:
/Library/MySQL/bin/mysql
but I have the OS X binary of 4.1.12 installed under /usr/local.
I've got a MySQL System Preference that tells me that MySQL is RUNNING, but hitting the Stop MySQL Server does nothing.

Any suggestions for getting me out of this mess would be appreciated. (I'm on Tiger 10.4)

Thomas Balthazar

Hi everybody,

To fix the problem with the
"$ sudo gem install mysql——with-mysql-dir=/usr/local/mysql" that return this error : "invalid storage class for function 'res_free'", change gcc to v3.3 before typing that command :

$ sudo gcc_select 3.3
$ sudo gem install mysql——with-mysql-dir=/usr/local/mysql

Cheers,
Thomas.

JFB

I had to insert

sudo gcc_select 3.3

before step 8, and and revert back to 4.0 after

sudo gcc_select 4.0

otherwise, I got:

Building native extensions. This could take a while...
mysql.c: In function 'query':
mysql.c:635: error: invalid storage class for function 'res_free'
mysql.c:637: error: 'res_free' undeclared (first use in this function)
mysql.c:637: error: (Each undeclared identifier is reported only once
mysql.c:637: error: for each function it appears in.)
make: *** [mysql.o] Error 1

for the love of god

macsystm05:~ empirikal$ sudo gem install mysqlwith-mysql-dir=/usr/local/mysql
Attempting local installation of 'mysqlwith-mysql-dir=/usr/local/mysql'
Local gem file not found: mysqlwith-mysql-dir=/usr/local/mysql*.gem
Attempting remote installation of 'mysqlwith-mysql-dir=/usr/local/mysql'
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find mysqlwith-mysql-dir=/usr/local/mysql (> 0) in the repository
macsystm05:~ empirikal$

what does this mean?

Jose

hi for the love of god,

Try the command just like this:
sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql and let me know how it works out.

Ed Burns

I'm still getting the same error as described at

http://www.oreillynet.com/cs/user/view/cs_msg/60785

even after following the above steps.

Any other ideas?

Ed

Jose

Hi Ed,

The install on Tiger has changed since my post and I haven't made the update to it. Sorry. However, yesterday I received an email asking for help on how to install ROR on OS X and I walked her through the install.

Note: I'm assuming you are using OS X Tiger and a version of MySQL prior to 4.13


This is what I wrote:

Follow me, I'll walk you through it. The link for that is:

http://wiki.rubyonrails.com/rails/pages/HowtoInstallOnOSXTiger

Click on the "Rolling with Ruby on Rails on Mac OS X Tiger" link. When you get to Tony's page, click on the "Ruby on Rails installer package" link. Download the package and install it. Once you finish that installation, go back to Tony's page and update your rubygems by typing on a terminal:

sudo gem update

Note: it will ask you for your password. Go ahead and type that in.

Are you following me so far? Good. A few more steps and you'll be set to go.

Go back to the ruby wiki page:

http://wiki.rubyonrails.com/rails/pages/HowtoInstallOnOSXTiger

and install the mysql gem (not the same as installing mysql the database, you already have that). You get that installed by doing the following steps:

Open up a terminal and type:

sudo gcc_select 3.3

and then:

sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql

That should take care of the mysql bindings - so ruby can communicate with mysql. Now all we need to do is fix a little bug in the ruby configuration that comes with OS X Tiger.

Open up a terminal and type:

sudo gem install fixrbconfig; sudo fixrbconfig

That should be it. You are set to go.

I highly recommend that you get the Agile Web Development with Rails. If you go through the tutorial you'll learn a ton.

Let me know if you have anymore questions.

Regards,

Jose

heating


If you have looked into solar energy as a method for heating your home, panels are usually the first things that come up.

There are, however, other unique methods.

The Solar Heating Aspect You Have Never Heard of Before

The power of the sun is immense. The energy in one day of sunlight is more than the world needs. The problem, of course,

is how does one harness this power. Solar panels represent the obvious solution, but they have their downside. First,

they can be expensive depending upon your energy needs. Second, they do not exactly blend in with the rest of your home.

Passive solar heating represents a panel free method of harnessing the inherent energy found in the sun for heating

purposes. If you come out from a store and open the door of your car in the summer, you understand the concept of passive

solar heating. A wide variety of material absorbs sunlight and radiates the energy back into the air in the form of heat.

Passive solar heating for a home works the same way as the process which overheats your car in the parking lot.

siriuslek

Hi here how are you? I am newbie in jmarinez.typepad.com so i hope i will get some friends here :)

The comments to this entry are closed.