Skip to content

Instantly share code, notes, and snippets.

/Users/brianmario/.rvm/rubies/ruby-1.8.7-p302/bin/ruby extconf.rb
(I'm about to compile yajl.. this will definitely take a while)
-- tar zxvf yajl-1.0.9.tar.gz
-- sed -i -e 's,yajl,json,g' *.h *.c api/*.h
-- /Users/brianmario/.rvm/rubies/ruby-1.8.7-p302/bin/ruby extconf.rb
-- make
-- libtool -static -o libyajl_ext.a json.o json_alloc.o json_buf.o json_encode.o json_gen.o json_lex.o json_parser.o
checking for main() in -lyajl_ext... yes
checking for json/json_gen.h... yes
checking for mach-o/dyld.h... yes
Brians-MacBook-Pro:~ brianmario$ gem install rails
Successfully installed activesupport-3.0.2
Successfully installed activemodel-3.0.2
Successfully installed rack-test-0.5.6
Successfully installed rack-mount-0.6.13
Successfully installed abstract-1.0.0
Successfully installed erubis-2.6.6
Successfully installed actionpack-3.0.2
Successfully installed arel-2.0.2
Successfully installed activerecord-3.0.2
C:\Users\Brian Lopez>C:\Ruby192\bin\gem install mysql2
Temporarily enhancing PATH to include DevKit...
Successfully installed mysql2-0.2.6-x86-mingw32
1 gem installed
Installing ri documentation for mysql2-0.2.6-x86-mingw32...
Enclosing class/module 'mMysql2' for class Client not known
Installing RDoc documentation for mysql2-0.2.6-x86-mingw32...
Enclosing class/module 'mMysql2' for class Client not known
C:\Users\Brian Lopez>C:\Ruby192\bin\irb
Rehearsal ------------------------------------
Mysql2
store_result: 3, errno: 0, client: 0x100869800
store_result: 3, errno: 0, client: 0x100869800
store_result: 3, errno: 0, client: 0x100869800
store_result: 3, errno: 0, client: 0x100869800
store_result: 3, errno: 0, client: 0x100869800
store_result: 3, errno: 0, client: 0x100869800
store_result: 3, errno: 0, client: 0x100869800
store_result: 3, errno: 0, client: 0x100869800
ruby-1.8.7-p302 > EscapeUtils.escape_uri "/whaddup/github"
=> "/whaddup/github"
ruby-1.8.7-p302 > EscapeUtils.escape_url "/whaddup/github"
=> "%2Fwhaddup%2Fgithub"
$LOAD_PATH.unshift 'lib'
require 'mysql2'
c = Mysql2::Client.new
c.query "SELECT 1"
C:\mysql2>gem install eventmachine win32console
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
irb(main):002:0> require 'mysql2'
=> true
irb(main):003:0> Mysql2::Client.new
[New Thread 2440.0xba4]
Program received signal SIGTRAP, Trace/breakpoint trap.
0x100f4eae in mysql_thread_init () from C:\Ruby192\bin\libmysql.dll
(gdb) disas rb_connect
Dump of assembler code for function rb_connect:
0x63b414ce <+0>: push %ebp
irb(main):002:0> require 'mysql2'
=> true
irb(main):003:0> Mysql2::Client.new
[New Thread 2440.0xba4]
Program received signal SIGTRAP, Trace/breakpoint trap.
0x100f4eae in mysql_thread_init () from C:\Ruby192\bin\libmysql.dll
(gdb) disas rb_connect
Dump of assembler code for function rb_connect:
0x63b414ce <+0>: push %ebp
(gdb) bt
#0 0x100f4eae in mysql_thread_init () from C:\Ruby192\bin\libmysql.dll
#1 0x1000bede in mysql_thread_init () from C:\Ruby192\bin\libmysql.dll
#2 0x101a14c0 in mysql_thread_init () from C:\Ruby192\bin\libmysql.dll
#3 0x1000f092 in mysql_thread_init () from C:\Ruby192\bin\libmysql.dll
#4 0x0235d600 in ?? ()
#5 0x63b4162a in rb_connect (self=40113672, user=4, pass=4, host=4, port=4, database=4, socket=4, flags=1) at ../../../../ext/mysql2/client.c:170
#6 0x62e3e5f1 in rb_vm_mark () from C:\Ruby192\bin\msvcrt-ruby191.dll
#7 0x62e4d8d7 in rb_remove_method_id () from C:\Ruby192\bin\msvcrt-ruby191.dll
#8 0x62e42dd3 in rb_vm_localjump_error () from C:\Ruby192\bin\msvcrt-ruby191.dll