<< | Index | >>
suspend
suspend
Reference
Reference
I got the same
C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/html/util/known_user.rb:19:in `initialize': invalid encoding ("utf8", "la tin1") (Iconv::InvalidEncoding) from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/html/util/known_user.rb:19:in `new' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/html/util/known_user.rb:19 from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/util/server.rb:4 from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/util.rb:9 from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/bin/oddbd:11 from C:/Ruby186/bin/oddbd:19:in `load' from C:/Ruby186/bin/oddbd:19
Run oddbd (de.oddb)
Set PATH for postgresql commands
C:\Ruby186\bin;C:\Program Files (x86)\Vim\vim73\;C:\Program Files (x86)\PostgreSQL\8.4\bin;
Install devkit
Reference
Then
I can also create a database by using 'createdb' command
createdb -U oddb -E utf8 -T template0 oddb
Install libIconv for Windows
Set PATH
C:\Ruby186\bin;C:\Program Files (x86)\Vim\vim73\;C:\Program Files (x86)\PostgreSQL\8.4\bin;C:\mingw\bin;C:\mingw\mingw\bin;C:\Program Files (x86)\GnuWin32\bin;
Iconv test
C:\Users\masa>type test.rb require 'iconv' #i = Iconv.new('utf8','latin1') i = Iconv.new('UTF-8','LATIN1') p i
Result
C:\Users\masa>ruby test.rb #<Iconv:0x42868c8>
Note
Experiment
C:\Users\masa>vim C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/html/util/known_user.rb
#@@iconv = Iconv.new('utf8', 'latin1') @@iconv = Iconv.new('UTF-8', 'LATIN1')
Run oddbd
C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- htmlgrid/divtem plate (LoadError) from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/html/view/template.rb:4 from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/html/view/drugs/template.rb:4 from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/html/view/drugs/init.rb:4 ... 13 levels... from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/bin/oddbd:11 from C:/Ruby186/bin/oddbd:19:in `load' from C:/Ruby186/bin/oddbd:19
Note
Install
Run oddbd
C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': C:/Ruby186/lib/ruby/gems/1.8/gems/de.od db-2.0.0/lib/oddb/import/pharmnet.rb:556: undefined (?...) sequence: /(?<!nicht )akzeptieren/ (SyntaxError) C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/import/pharmnet.rb:788: undefined (?...) sequence: /^(?<name>.*?)\s*-\s*O P((?<size>\d+)|\((?<multi>\d+)x(?<size>\d+)\))(\((?<unit>[^)]+)\))?$/ from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/html/state/drugs/admin/package.rb:6 from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/html/state/viral/admin.rb:4 from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/html/state/login.rb:4 ... 16 levels... from C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/bin/oddbd:11 from C:/Ruby186/bin/oddbd:19:in `load' from C:/Ruby186/bin/oddbd:19
Note
Check Ruby version
C:\Users\masa>ruby -v ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]
Install win-bash
Put win-bash.exe in the directory of PATH (anywere)
Install patch for windows
Install tar for windows
Install gzip for windows
Install Ruby 1.8.6 with oniguruma patch
Reference
Result
ruby.c: In function 'ruby_init_loadpath': ruby.c:318:42: warning: universal character names are only valid in C++ and C99 ruby.c:318:42: error: incomplete universal character name \U ruby.c:318:42: warning: unknown escape sequence: '\m' ruby.c:318:42: warning: unknown escape sequence: '\w' ruby.c:322:45: warning: universal character names are only valid in C++ and C99 ruby.c:322:45: error: incomplete universal character name \U ruby.c:322:45: warning: unknown escape sequence: '\m' ruby.c:322:45: warning: unknown escape sequence: '\w' ruby.c:323:41: warning: universal character names are only valid in C++ and C99 ruby.c:323:41: error: incomplete universal character name \U ruby.c:323:41: warning: unknown escape sequence: '\m' ruby.c:323:41: warning: unknown escape sequence: '\w' make: *** [ruby.o] Error 1
Install Ruby 1.8.6 with oniguruma patch on Cygwin
Install de.oddb through gem
#@@iconv = Iconv.new('utf8', 'latin1') @@iconv = Iconv.new('UTF-8', 'LATIN1')
$ ./gem install mechanize Fetching: nokogiri-1.4.4.gem (100%) Building native extensions. This could take a while... ERROR: Error installing mechanize: ERROR: Failed to build gem native extension. /cygdrive/c/Users/masa/ruby186/bin/ruby.exe extconf.rb checking for #include <libxml/parser.h> ... no ----- libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies. -----
Install libxml2, libxml2-devel and libxsl, libxsl-devel through cygwin setup.exe
Install openssl, openssl-devel through cygwin
Error
/cygdrive/c/Users/masa/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require': no such file to load -- openssl (LoadError) from /cygdrive/c/Users/masa/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from /cygdrive/c/Users/masa/ruby186/lib/ruby/1.8/net/https.rb:102 from /cygdrive/c/Users/masa/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' from /cygdrive/c/Users/masa/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from /cygdrive/c/Users/masa/ruby186/lib/ruby/gems/1.8/gems/mechanize-1.0.0/lib/mechanize.rb:2 from /cygdrive/c/Users/masa/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34:in `gem_original_require' from /cygdrive/c/Users/masa/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:34:in `require' from /cygdrive/c/Users/masa/ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/import/pharmnet.rb:6 ... 25 levels... from /cygdrive/c/Users/masa/ruby186/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from /cygdrive/c/Users/masa/ruby186/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/bin/oddbd:11 from /usr/bin/oddbd:19:in `load' from /usr/bin/oddbd:19
Note
Re-conpile Ruby
Error
/cygdrive/c/Users/masa/ruby186_2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require': no such file to load - - encoding/character/utf-8 (LoadError) from /cygdrive/c/Users/masa/ruby186_2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from /cygdrive/c/Users/masa/ruby186_2/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/import/importer.rb:1 from /cygdrive/c/Users/masa/ruby186_2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' from /cygdrive/c/Users/masa/ruby186_2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from /cygdrive/c/Users/masa/ruby186_2/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/import/pharmnet.rb:7 from /cygdrive/c/Users/masa/ruby186_2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require' from /cygdrive/c/Users/masa/ruby186_2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from /cygdrive/c/Users/masa/ruby186_2/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib/oddb/html/state/drugs/admin/package.rb:6 ... 22 levels... from /cygdrive/c/Users/masa/ruby186_2/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' from /cygdrive/c/Users/masa/ruby186_2/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/bin/oddbd:11 from /usr/bin/oddbd:19:in `load' from /usr/bin/oddbd:19
Install character-encodings
make gcc -I. -I/cygdrive/c/Users/masa/ruby186_2/lib/ruby/1.8/i386-cygwin -I/cygdrive/c/Users/masa/ruby186_2/lib/ruby/1.8/i386-cygwin -I. -DH AVE_ASSERT_H -DHAVE_LIMITS_H -DHAVE_LOCALE_H -DHAVE_STDBOOL_H -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDIO_H -DHAVE_STDLIB_H -DHAVE_STR ING_H -DHAVE_SYS_TYPES_H -DHAVE_WCHAR_H -g -O2 -std=c99 -finline-functions -Wall -Wextra -Wwrite-strings -Waggregate-return -Wmissin g-prototypes -Wmissing-declarations -Wnested-externs -Wundef -Wpointer-arith -Wcast-align -Werror -Winline -c break.c gcc -I. -I/cygdrive/c/Users/masa/ruby186_2/lib/ruby/1.8/i386-cygwin -I/cygdrive/c/Users/masa/ruby186_2/lib/ruby/1.8/i386-cygwin -I. -DH AVE_ASSERT_H -DHAVE_LIMITS_H -DHAVE_LOCALE_H -DHAVE_STDBOOL_H -DHAVE_STDDEF_H -DHAVE_STDINT_H -DHAVE_STDIO_H -DHAVE_STDLIB_H -DHAVE_STR ING_H -DHAVE_SYS_TYPES_H -DHAVE_WCHAR_H -g -O2 -std=c99 -finline-functions -Wall -Wextra -Wwrite-strings -Waggregate-return -Wmissin g-prototypes -Wmissing-declarations -Wnested-externs -Wundef -Wpointer-arith -Wcast-align -Werror -Winline -c decompose.c decompose.c: In function `_utf_normalize_wc': decompose.c:410: Warnung: Sichtbarkeitsattribute werden in dieser Konfiguration nicht unterst"utzt; ignoriert make: *** [decompose.o] Fehler 1 Gem files will remain installed in /cygdrive/c/Users/masa/ruby186_2/lib/ruby/gems/1.8/gems/character-encodings-0.4.1 for inspection. Results logged to /cygdrive/c/Users/masa/ruby186_2/lib/ruby/gems/1.8/gems/character-encodings-0.4.1/ext/encoding/character/utf-8/gem_ma ke.out
Note
suspend
Install character-encodings and rkj-character-encodings
masa@masa ~/work $ gem search character-encoding *** LOCAL GEMS *** character-encodings (0.4.1) rkj-character-encodings (0.4.1)
sample
require 'encoding/character/utf-8' str = u"hëllö" p str.length #=> 5 p str.reverse.length #=> 5 p str[/ël/] #=> "ël"
Reference