我想在我的机器上安装DataMapper的dm-types
gem install dm-types
我从RubyInstaller(1.9.3)安装了Ruby,我也安装了DevKit。 (以及像sinatra,haml,dm-core和bcrypt-ruby等其他gem)。
但是,当我运行“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
我的谷歌福显示,有/一些bcrypt依赖不会build立在Windows上,但bcrypt完美安装。 我的系统path中也有nmake.exe。
那么如何让dmtypes在Windows 7 x64上运行呢?
另外,我绝对不反对擦拭我的机器清除所有与ruby有关的事情,并重新开始。
它看起来红宝石的路径中的空间正在拧makefile。 也许尝试暂时在Windows上创建一个符号链接,如:
mklink /dc:\ruby "C:\Program Files (x86)\Ruby\Ruby193"
然后尝试安装。 安装后可以删除符号链接。
C:\ruby\bin\gem install dm-types
Mayro说的是对的,我必须注意的是,除了用户PATH之外,DevKit的链接也在系统变量PATH中,链接导致了我的问题。
或者将环境变量中的PATH设置为C:\ Progra〜2 \ Ruby \ Ruby193 \ bin而不是C:\ Program Files \ Ruby \ Ruby193 \ bin
Progra〜1应该是Program Files,Progra〜2应该是Program Files(x86)