Screencast: Setting Up — Mac OSX
Guest starring: Max Newell of thirdbIT
(In two parts)
Ruby and Rails Install Screencast for Mac OSX, Part 1
Ruby and Rails Install Screencast for Mac OSX, Part 2
This presentation is a quick walkthrough of installing Ruby, Rails, and MySQL on a Mac OS X Tiger ( 10.4) machine. It’s somewhat simpler than HiveLogic’s excellent tutorial, which requires building Ruby from source.
The prerequisites: You’ll need an account that is allowed to provide administrative functions, and you’ll need to have downloaded the MySQL installer and the Ruby one-click installer.
1) Install MySQL from .dmg package. This doesn’t have to go first, but it does have to go before the very last steps. Download from http://dev.mysql.com/downloads/mysql/5.0.html
2) Install Ruby oneclick; download from http://rubyosx.rubyforge.org/
3) Install rails via gem: “sudo gem install rails –include-dependencies” from terminal window.
4) Install the mysql bindings. Rails doesn’t require these native bindings to connect to MySQL, but the performance is better.
“sudo gem install mysql — –with-mysql-dir=/usr/local/mysql”
Choose most recent native Ruby gem.
5) Lastly, you must run this step to avoid Rails/MySQL problems when using the native bindings:
“sudo install_name_tool -change /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib /usr/local/mysql/lib/libmysqlclient.15.dylib /usr/local/lib/ruby/gems/1.8/gems/mysql- 2.7/lib/mysql.bundle”
6) Test Rails application: “rails test1″ ; “cd test 1″ ; “script/server”
Test localhost:3000 in browser window.
7) Edit ~/.bash_profile and add /usr/local/mysql/bin to PATH.
HiveLogic tutorial describes how to do the whole shebang from source: http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx
Recent Comments