December 2010

uninitialized constant MysqlCompat::MysqlRes

After getting the dreaded uninitialized constant MysqlCompat::MysqlRes error on OS X Snow Leopard, I finally found a solution.

Error:

$ rake db:migrate
...
rake aborted!
uninitialized constant MysqlCompat::MysqlRes

Solution from http://techliberty.blogspot.com/:

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

mysql
osx
rails

Comments (0)

Permalink

Installing/Upgrading Passenger + Nginx

After numerous searches, I found this post extremely helpful:
http://www.jotlab.com/2009/11/08/installing-ruby-on-rails-mysql-imagemagick-nginx-passenger-with-macports/

Highlights:

Install or update Passenger:
sudo gem install passenger

Find Passenger install path:
passenger-config --root

Configure MacPorts to use Passenger varient of Nginx:
cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/www/nginx

Open config file:
sudo vi Portfile

Insert at the bottom of the file:

variant passenger description {Adds passenger support} {
    configure.args-append  --add-module=/Library/Ruby/Gems/1.8/gems/passenger-3.0.1/ext/nginx
}

Install/update Nginx:
sudo port install nginx +gzip_static +passenger +ssl

rails

Comments (0)

Permalink