Skip to content

Instantly share code, notes, and snippets.

@toddthomas
toddthomas / convert.rake
Created May 4, 2012 18:42 — forked from mperham/convert.rake
Ruby script to update MySQL from Latin1 to UTF8 without data conversion
desc "convert a latin1 database with utf8 data into proper utf8"
task :convert_to_utf8 => :environment do
puts Time.now
dryrun = ENV['DOIT'] != '1'
conn = ActiveRecord::Base.connection
if dryrun
def conn.run_sql(sql)
puts(sql)
end
else
@toddthomas
toddthomas / rvm-install-ree-1.8.6-error
Created April 28, 2011 15:26
Error attempting `rvm install ree-1.8.6'
[2011-04-28 08:40:38] GEM_PATH="/Users/todd/.rvm/gems/ree-1.8.6-20090610:/Users/todd/.rvm/gems/ree-1.8.6-20090610@global:/Users/todd/.rvm/gems/ree-1.8.6-20090610:/Users/todd/.rvm/gems/ree-1.8.6-20090610@global" GEM_HOME="/Users/todd/.rvm/gems/ree-1.8.6-20090610" "/Users/todd/.rvm/rubies/ree-1.8.6-20090610/bin/ruby" "/Users/todd/.rvm/src/rubygems-1.6.2/setup.rb"
./lib/rubygems/custom_require.rb:54: warning: parenthesize argument(s) for future version
./lib/rubygems/custom_require.rb:57:in `require': undefined method `end_with?' for "no such file to load -- Win32API":String (NoMethodError)
from ./lib/rubygems/config_file.rb:55
from ./lib/rubygems/custom_require.rb:36:in `gem_original_require'
from ./lib/rubygems/custom_require.rb:36:in `require'
from ./lib/rubygems/gem_runner.rb:8
from ./lib/rubygems/custom_require.rb:36:in `gem_original_require'
from ./lib/rubygems/custom_require.rb:36:in `require'
from /Users/todd/.rvm/src/rubygems-1.6.2/setup.rb:25