我一直试图在网上搜索如何在SketchUp中使用rubygems,但一直无法找到具体的方法。
以下是C:\Program Files\Google\Google SketchUp 8\Plugins\gems.rb
中的插件:
$: << 'C:/Ruby186/lib/ruby/site_ruby/1.8'
$: << 'C:/Ruby186/lib/ruby/site_ruby/1.8/i386-msvcrt'
$: << 'C:/Ruby186/lib/ruby/site_ruby'
$: << 'C:/Ruby186/lib/ruby/1.8'
$: << 'C:/Ruby186/lib/ruby/1.8/i386-mingw32'
$: << '.'
require 'rubygems'
我收到以下错误:
Error: #<LoadError: C:/Ruby186/lib/ruby/1.8/i386-mingw32/thread.so: 127: The specified procedure could not be found. - C:/Ruby186/lib/ruby/1.8/i386-mingw32/thread.so>
(eval):14
C:/Ruby186/lib/ruby/1.8/thread.rb:5
C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems.rb:11:in `require'
C:/Ruby186/lib/ruby/site_ruby/1.8/rubygems.rb:11
(eval):14:in `require'
(eval):14
但是,thread.so正好在C:/Ruby186/lib/ruby/1.8/i386-mingw32
:
C:\Ruby186\lib\ruby\1.8\i386-mingw32>ls
Win32API.so digest.so fcntl.so openssl.so sdbm.so version.h
bigdecimal.so dl.h gdbm.so racc socket.so win32
config.h dl.so iconv.so rbconfig.rb st.h win32ole.so
curses.so dlconfig.h intern.h re.h stringio.so zlib.so
dbm.so dln.h io regex.h strscan.so
defines.h enumerator.so missing.h ruby.h syck.so
digest env.h nkf.so rubyio.h thread.so
digest.h etc.so node.h rubysig.h util.h
尝试在SketchUp Ruby Panel中进行测试:
> require 'bigdecimal'
true
> require 'curses'
true
> require 'dbm'
true
> require 'digest'
true
> require 'digest/md5'
Error: #<LoadError: C:/Ruby186/lib/ruby/1.8/i386-mingw32/digest/md5.so: 126: The specified procedure could not be found. - C:/Ruby186/lib/ruby/1.8/i386-mingw32/digest/md5.so>
(eval):14
(eval):14
> require 'digest\md5'
Error: #<LoadError: C:/Ruby186/lib/ruby/1.8/i386-mingw32/digest\md5.so: 126: The specified procedure could not be found. - C:/Ruby186/lib/ruby/1.8/i386-mingw32/digest\md5.so>
(eval):14
(eval):14
> require 'digest/sha1'
Error: #<LoadError: C:/Ruby186/lib/ruby/1.8/i386-mingw32/digest/sha1.so: 126: The specified procedure could not be found. - C:/Ruby186/lib/ruby/1.8/i386-mingw32/digest/sha1.so>
(eval):14
(eval):14
> require 'digest\sha1'
Error: #<LoadError: C:/Ruby186/lib/ruby/1.8/i386-mingw32/digest\sha1.so: 126: The specified procedure could not be found. - C:/Ruby186/lib/ruby/1.8/i386-mingw32/digest\sha1.so>
(eval):14
(eval):14
> require 'digest\sha2'
true
> require 'digest/sha2'
true
C:/Ruby186/lib/ruby/1.8/i386-mingw32
中的某些文件可以正确使用,而有些文件却无法提示LoadError?true
?是否与装载问题有关?