Ruby Gem,Windows上的加载错误 - 在mac上工作正常

时间:2016-03-05 00:59:32

标签: ruby windows-7 rubygems sinatra

我希望这个错误不是源于我的mac使用ruby 2.3和windows using 2.0

可能会注意到,一般来说我对ruby很新。我有一个小小的sinatra应用程序,我在我的Mac上制作,我试图把它带到我的Windows机器上运行它,当我在Windows上运行它时会发生这种情况:

C:\Users\ALilland\Documents\ruby>ruby web.rb
C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- dm-sqlite-adapter (LoadError)
        from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.1/lib/dm-core/adapters.rb:163:in `load_adapter'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.1/lib/dm-core/adapters.rb:133:in `adapter_class'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.1/lib/dm-core/adapters.rb:13:in `new'
        from C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/dm-core-1.2.1/lib/dm-core.rb:230:in `setup'
        from web.rb:10:in `<main>'

C:\Users\ALilland\Documents\ruby>

我尝试删除并重新安装宝石,这是它给了我的东西 mkmf.log文件

have_header: checking for sqlite3.h... -------------------- no

"x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -I/usr/local/include -I/opt/local/include -I/usr/include -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wall  -DHAVE_NO_DATETIME_NEWBANG conftest.c  -L. -LC:/Ruby200-x64/lib -L/usr/local/ -L/opt/local/ -L/usr/ -L.      -lx64-msvcrt-ruby200  -lshell32 -lws2_32 -limagehlp -lshlwapi  "
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return 0;
8: }
/* end */

"x86_64-w64-mingw32-gcc -E -IC:/Ruby200-x64/include/ruby-2.0.0/x64-mingw32 -IC:/Ruby200-x64/include/ruby-2.0.0/ruby/backward -IC:/Ruby200-x64/include/ruby-2.0.0 -I. -I/usr/local/include -I/opt/local/include -I/usr/include -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0501 -D_FILE_OFFSET_BITS=64   -O3 -fno-omit-frame-pointer -fno-fast-math -g -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wall  -DHAVE_NO_DATETIME_NEWBANG  conftest.c -o conftest.i"
conftest.c:5:21: fatal error: sqlite3.h: No such file or directory
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2: 
3: #include <winsock2.h>
4: #include <windows.h>
5: #include <sqlite3.h>
/* end */

--------------------

gem_make.out文件

C:/Ruby200-x64/bin/ruby.exe extconf.rb
checking for sqlite3.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby200-x64/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/

0 个答案:

没有答案