在 Windows 上安装 dm-types。 (Win7 x64)

2023-12-14

我正在尝试在我的机器上安装 DataMapper 的 dm-types

gem install dm-types 

我已经从 RubyInstaller (1.9.3) 安装了 Ruby,并且还安装了 DevKit。 (以及其他一些宝石,如 sinatra、haml、dm-core 和 bcrypt-ruby)。
但是,当我运行“gem install dm-types”时,会发生这种情况。

C:\Users\Lev>gem install dm-types
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing dm-types:
        ERROR: Failed to build gem native extension.

        "C:/Program Files (x86)/Ruby/Ruby193/bin/ruby.exe" extconf.rb
creating Makefile

make
Makefile:172: warning: overriding commands for target `C:/Program'
Makefile:163: warning: ignoring old commands for target `C:/Program'
Makefile:172: warning: overriding commands for target `Files'
Makefile:163: warning: ignoring old commands for target `Files'
Makefile:215: *** multiple target patterns.  Stop.


Gem files will remain installed in C:/Program Files (x86)/Ruby/Ruby193/lib/ruby/
gems/1.9.1/gems/json-1.6.5 for inspection.
Results logged to C:/Program Files (x86)/Ruby/Ruby193/lib/ruby/gems/1.9.1/gems/j
son-1.6.5/ext/json/ext/parser/gem_make.out

我的 google-fu 显示,有一些 bcrypt 依赖项无法在 Windows 上构建,但 bcrypt 安装完美。我的系统路径中也有 nmake.exe。

那么如何才能让 dm-types 在 Windows 7 x64 上工作呢?

另外,我绝对不反对清除机器上所有与 Ruby 相关的东西并重新开始。


看起来 ruby​​ 路径中的空格正在搞乱 makefile。也许尝试在 Windows 上临时创建一个符号链接,例如:

mklink /d c:\ruby "C:\Program Files (x86)\Ruby\Ruby193"

然后尝试安装。您可以在安装后删除符号链接。

C:\ruby\bin\gem install dm-types
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 Windows 上安装 dm-types。 (Win7 x64) 的相关文章

随机推荐