Skip to content

Instantly share code, notes, and snippets.

View mphalliday's full-sized avatar

Michael Halliday mphalliday

View GitHub Profile
@mphalliday
mphalliday / nokogiri
Created September 9, 2011 15:04 — forked from fabioyamate/nokogiri
nokogiri installation from libxml2 and libxslt macosx
# using rvm with ruby-1.8.7-p249
# latest version 2.7.7 2010-06-17
brew install libxml2
# installing libxslt from source code
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7
make
sudo make install
david$ env ARCHFLAGS="-arch x86_64" gem install mysql2
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - /Users/david/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.3.2/.gitignore
SilverBullet:ror david$ sudo env ARCHFLAGS="-arch x86_64" gem install mysql2
Password:
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/Users/david/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb
@mphalliday
mphalliday / devise_migration.rb
Created June 4, 2011 13:06 — forked from Bertg/devise_migration.rb
Migrating to a new password encryption in devise, coming from authlogic
class MigrateUserToDevise < ActiveRecord::Migration
def self.up
change_table :users do |t|
t.string :encrypted_password, :null => false, :limit => 128
# ...
end
end
def self.down
end