RailsConf 2008

Setting up RoR in Tiger

Jun 04, 2005 17 comments

Here is the real solution to getting everything working that you need for Ruby on Rails in OS X 10.4.2: (as of 8/30/05)

  • Fresh install of Tiger
  • Install XCode 2
  • Download and run this script:
    curl -O rufy.com/fix-ruby-tiger.sh;<br/> sh fix-ruby-tiger.sh
  • sudo gem install rails
  • Download MySQL 4.1 OS X 10.3 binary from Mysql.com
  • I recommend installing the MySQL startup script and preference pane as well, but you don’t have to (both come with the mysql binary)
  • Download the latest ruby mysql source from http://www.tmtm.org/en/mysql/ruby/
  • Unzip, untar the folder, navigate to it, then type the following:
    • ruby extconf.rb—with-mysql-config
    • sudo make install
  • Delete the folder if you’d like and you’re done!

And now you have a fixed copy of Ruby (readline is broken and there’s a bug with rbconfig by default in Tiger), ruby gems, rails, MySQL, and the MySQL ruby drivers. I hope that helps somebody else, because had I not used Rails before and seen how cool it was I would have never had the patience to try and get it working.

17 comments


Graham MacDonald said about 1 month later:

Cheers mate – worked a treat!

Ralf said about 1 month later:

Hey, that’s great, I never would have the patience to find out what I have to do to make the RoR-Thing work. Thanks! :-)

andy said about 1 month later:

when i try the ‘sudo make install’, i get this:

$ sudo make install Password: make: * No rule to make target ‘install’. Stop.

Is this right? I’m thinking no…

Any ideas? Things still aren’t working right for me with RoR.

Jeff said 2 months later:

Thanks. Unfortunately, I can’t seem to get the latest ruby mysql source to compile…

nicklas said 2 months later:

I’ve got 10.4.2 and xcode 2.1 and did follow the instructions on this page and did run into problems when I tried to use scaffold in ruby on rails. (And probably all mysql database related methods and functions)

The ruby server failed with this error:

dyld: NSLinkModule() error dyld: Symbol not found: _sprintf$LDBLStub Referenced from: /usr/lib/ruby/site_ruby/1.8/powerpc-darwin8.0/mysql.bundle Expected in: flat namespace

Trace/BPT trap

after some googling (without finding anything) I tried to compile mysql-ruby-2.7-beta2 with gcc4.0 instead of gcc3.3 and boom.. now it works!

PJ Hyett said 2 months later:

You’re correct, originally you needed to use gcc3.3 to compile the Mysql ruby drivers, not anymore. I’ve updated the howto to reflect those changes.

Sumul said 3 months later:

Thank you!

Skweez said 3 months later:

Wow! nicklas, your solution worked! Thanks man!

Kevin Newman said 3 months later:

I get : extconf.rb:1: command not found: mysql_config—cflags

when I type ruby extconf.rb—with-mysql-config

Rob Meyer said 3 months later:

Thanks for the help! I took the problems I ran into with descriptions here, so hopefully this will help others get past some of them:

http://www.evilrob.org/journal/archives/000198.html

PJ Hyett said 4 months later:

At this point, I feel obliged to mention to any OS X RoR user to try out Locomotive if they’re still having problems.

John Shaw said 4 months later:

In Response to Kevin Newman, i got the same error, and then I remembered you need to specify to ruby where your mysql_config is located.

so for me, that made my command like so:

ruby extconf.rb—with-mysql-config=/usr/local/mysql/bin/mysql_config

And it worked out great.

AJ said 5 months later:

Thanks! BTW, I had to use the same command as John Shaw…

Zach said 6 months later:

Thanks!!! It worked for me…

I had to use the trick John Shaw wrote about, too. Thanks guys

Zach said 6 months later:

Thanks!!! It worked for me…

I had to use the trick John Shaw wrote about, too. Thanks guys

Ed said 6 months later:

PJ/John Shaw – Thank You!

You saved me a lot of headache. I rolled back from MySQL 5.0 to 4.1 and it worked. My life just got better after about 4 hours wasted on this problem.

matt said 8 months later:

when i type ruby “extconf.rb—with-mysql-config=/usr/local/mysql/bin/mysql_config” i get “can’t find header files for ruby.” Please help

Name
Url