Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing dm-types on Windows. (Win7 x64)

I am trying to install dm-types for DataMapper on my machine with

gem install dm-types 

I've installed Ruby from RubyInstaller (1.9.3) and I also have the DevKit installed. (Aswell as some other gems like sinatra, haml, dm-core and bcrypt-ruby).
However, when I run "gem install dm-types", this happens.

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

My google-fu revealed that there are/were some bcrypt dependencies that won't build on windows but bcrypt installed flawlessly. I also have nmake.exe in my system path.

So how can I get dm-types to work on Windows 7 x64?

Also, I have absolutely no objection to wiping my machine clean of all ruby-related things and starting again.

like image 494
Lev Dubinets Avatar asked Jan 17 '12 00:01

Lev Dubinets


2 Answers

It looks the the spaces in the path for ruby are screwing up the makefile. Maybe try creating a symlink on Windows temporarily, like:

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

and then try installing. You can delete the symlink after installing.

C:\ruby\bin\gem install dm-types
like image 193
termie Avatar answered Oct 04 '22 02:10

termie


What Mayro said was right on the money, the thing I had to look out for was that In addition to the user PATH the link to the DevKit was also in the System Variables PATH which had the link that was causing my problem.

like image 28
Will Atkinson Avatar answered Oct 04 '22 02:10

Will Atkinson