Hello, I tried to install Nikolai Weibull's Ruby Character Encodings Library [1] with Ruby 1.9, but didn't succeed. $ sudo gem1.9 install character-encodings Building native extensions. This could take a while... ERROR: Error installing character-encodings: ERROR: Failed to build gem native extension. /opt/local/bin/ruby1.9 extconf.rb install character-encodings extconf.rb:4: invalid multibyte char extconf.rb:4: invalid multibyte char extconf.rb:4: syntax error, unexpected $end, expecting keyword_end checking_for "¡Æ#{opt}¡Ç option to compiler" do ^ Gem files will remain installed in /opt/local/lib/ruby/gems/1.9.0/gems/character-encodings-0.4.1 for inspection. Results logged to /opt/local/lib/ruby/gems/1.9.0/gems/character-encodings-0.4.1/ext/encoding/character/utf-8/gem_make.out I downloaded the gem, extracted it, added a magic comment at the top of the file and manually called the configure command, that worked. $ ruby1.9 extconf.rb install character-encodings checking for ¡Æ-std=c99¡Ç option to compiler... yes checking for ¡Æ-finline-functions¡Ç option to compiler... yes checking for ¡Æ-Wall¡Ç option to compiler... yes checking for ¡Æ-Wextra¡Ç option to compiler... yes checking for ¡Æ-Wwrite-strings¡Ç option to compiler... yes checking for ¡Æ-Waggregate-return¡Ç option to compiler... yes checking for ¡Æ-Wmissing-prototypes¡Ç option to compiler... yes checking for ¡Æ-Wmissing-declarations¡Ç option to compiler... yes checking for ¡Æ-Wnested-externs¡Ç option to compiler... yes checking for ¡Æ-Wundef¡Ç option to compiler... yes checking for ¡Æ-Wpointer-arith¡Ç option to compiler... yes checking for ¡Æ-Wcast-align¡Ç option to compiler... yes checking for ¡Æ-Werror¡Ç option to compiler... yes checking for ¡Æ-Winline¡Ç option to compiler... yes checking for assert.h... yes checking for limits.h... yes checking for locale.h... yes checking for stdbool.h... yes checking for stddef.h... yes checking for stdint.h... yes checking for stdio.h... yes checking for stdlib.h... yes checking for string.h... yes checking for sys/types.h... yes checking for wchar.h... yes creating Makefile But then the make command failed. $ make /usr/bin/gcc-4.0 -I. -I/opt/local/include/ruby-1.9.0/i686-darwin9.3.0 -I/opt/local/include/ruby-1.9.0 -I. -DHAVE_ASSERT_H -DHAVE_LIMITS_H -DHAVE_LOCALE_H -DHAVE_STDBOOL_H -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDIO_H -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_SYS_TYPES_H -DHAVE_WCHAR_H -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -fno-common -pipe -fno-common -std=c99 -finline-functions -Wall -Wextra -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wundef -Wpointer-arith -Wcast-align -Werror -Winline -o break.o -c break.c /usr/bin/gcc-4.0 -I. -I/opt/local/include/ruby-1.9.0/i686-darwin9.3.0 -I/opt/local/include/ruby-1.9.0 -I. -DHAVE_ASSERT_H -DHAVE_LIMITS_H -DHAVE_LOCALE_H -DHAVE_STDBOOL_H -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDIO_H -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_SYS_TYPES_H -DHAVE_WCHAR_H -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -fno-common -pipe -fno-common -std=c99 -finline-functions -Wall -Wextra -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wundef -Wpointer-arith -Wcast-align -Werror -Winline -o decompose.o -c decompose.c /usr/bin/gcc-4.0 -I. -I/opt/local/include/ruby-1.9.0/i686-darwin9.3.0 -I/opt/local/include/ruby-1.9.0 -I. -DHAVE_ASSERT_H -DHAVE_LIMITS_H -DHAVE_LOCALE_H -DHAVE_STDBOOL_H -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDIO_H -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_SYS_TYPES_H -DHAVE_WCHAR_H -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -fno-common -pipe -fno-common -std=c99 -finline-functions -Wall -Wextra -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wundef -Wpointer-arith -Wcast-align -Werror -Winline -o private.o -c private.c /usr/bin/gcc-4.0 -I. -I/opt/local/include/ruby-1.9.0/i686-darwin9.3.0 -I/opt/local/include/ruby-1.9.0 -I. -DHAVE_ASSERT_H -DHAVE_LIMITS_H -DHAVE_LOCALE_H -DHAVE_STDBOOL_H -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDIO_H -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_SYS_TYPES_H -DHAVE_WCHAR_H -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -fno-common -pipe -fno-common -std=c99 -finline-functions -Wall -Wextra -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wundef -Wpointer-arith -Wcast-align -Werror -Winline -o properties.o -c properties.c /usr/bin/gcc-4.0 -I. -I/opt/local/include/ruby-1.9.0/i686-darwin9.3.0 -I/opt/local/include/ruby-1.9.0 -I. -DHAVE_ASSERT_H -DHAVE_LIMITS_H -DHAVE_LOCALE_H -DHAVE_STDBOOL_H -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDIO_H -DHAVE_STDLIB_H -DHAVE_STRING_H -DHAVE_SYS_TYPES_H -DHAVE_WCHAR_H -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O2 -fno-common -pipe -fno-common -std=c99 -finline-functions -Wall -Wextra -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wundef -Wpointer-arith -Wcast-align -Werror -Winline -o rb_utf_aref.o -c rb_utf_aref.c rb_utf_aref.c:8:16: error: re.h: No such file or directory cc1: warnings being treated as errors rb_utf_aref.c: In function ¡Ærb_str_subpat¡Ç: rb_utf_aref.c:44: warning: implicit declaration of function ¡Ærb_reg_search¡Ç rb_utf_aref.c:44: warning: nested extern declaration of ¡Ærb_reg_search¡Ç rb_utf_aref.c: In function ¡Ærb_utf_aref_default¡Ç: rb_utf_aref.c:65: error: ¡Æstruct RString¡Ç has no member named ¡Æptr¡Ç rb_utf_aref.c:65: error: ¡Æstruct RString¡Ç has no member named ¡Ælen¡Ç make: *** [rb_utf_aref.o] Error 1 What can I do to make it work? Stefan [1] http://bitwi.se/software/ruby/character-encodings/