Installing The MySQL Ruby Gem When Using The Official MySQL .dmg
If you installed MySQL using the official .dmg package provided by MySQL AB/Sun and are trying to install the native MySQL gem, you’ll need to pass a bunch of flags to the gem install process to get the thing to compile. Try this..
sudo gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config
..if you still have issues (check your /opt/local/lib/ruby/gems/<ruby_ver>/gems/mysql-<gem_ver>/mkmf.log file), try this instead..
sudo gem install mysql — –with-mysql-dir=/usr/local/mysql –with-mysql-include=/usr/local/mysql/include/ –with-mysql-lib=/usr/local/mysql/lib/ –with-mysql-config=/usr/local/mysql/bin/mysql_config
Run `sudo gem install mysql` and definitely recheck the log file again as the gem install process sometimes reports false positives even if native components fail to install.
Tags: gem, howto, mysql, osx, rails, ruby, troubleshooting
Debugging JavaScript With Safari
I usually use FireBug and other FireFox-based tools for troubleshooting JavaScript issues, but never found a solid way to approach it in Safari, my primary browser. It turns out that the nightly builds of WebKit (Safari’s core) also come with a great utility called Drosera.app, which allows you to attach to a running WebKit process and get funky with a JavaScript console.
Tags: apple, debugging, drosera, firefox, javascript, mac, osx, rails, ror, ruby, safari, webkit
Marc Chung on Amazon Web Services
Mad props to fellow OpenRain’r Marc Chung for an excellent AWS presentation at this months Phoenix Rails meeting. Follow-up links..
- Full session audio in Rubyology episode #59, courtesy Chris Matthieu.
- Slides.
- Marc’s blog, recap and company.
- Derek’s recap.
Great job, Marc!
Tags: aws, marc chung, openrain, rails, ruby
Rails 2.0: selenium-on-rails routes.rb fix
When I updated a few projects to Rails 2.0 last year, selenium-on-rails stopped working … some issue with routing and the lame way selenium-on-rails adds its routes. I didn’t spend the time to figure out exactly what the routing problem was, but did manage to hack a quick fix into routes.rb. This feels like the Wrong Way for an ultimate fix but it at least solves the immediate problem. Shove these rules into your routes.rb and the /selenium path should start resolving again…
Tags: fix, rails, ror, ruby, selenium, selenium-on-rails, testing
Rails 2.0: Gmail SMTP With ActionMailer
Marc just checked in a nifty little Rails 2.0 plugin to the OpenRain public subversion repository which encapsulates the voodoo required to use a Gmail SMTP server with an otherwise ordinary ActionMailer configuration. Gmail requires TLS security, which is why this is useful. Grab the plugin for your Gmail-mooching Rails 2.0 site, here.
Note: I previously wrote about how to do this for Rails 1.2.x here.
Update (2008.06.25): Broken download link fixed!
Tags: gmail, marc chung, news, openrain, philanthropy, picture, rails, ruby





