Installing dm-types on Windows. (Win7 x64)
Asked Answered
B

3

5

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.

Beneficence answered 17/1, 2012 at 0:8 Comment(0)
T
13

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
Tactics answered 17/1, 2012 at 1:30 Comment(2)
Thanks! It worked :) I saw that it broke up the filepath with regards to the spaces, but had a hard time believing that the whitespace actually messed up installation (and so thought that i did something else wrong). For anybody having the same problem, C:\ruby\ruby.exe will not work because it is actually in the bin directory. 'C:\ruby\bin\gem install dm-types' is the command that I used.Beneficence
Thanks for the follow-up Lev! Saved me at least an hour of googling.Denunciate
E
2

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.

Elexa answered 19/11, 2012 at 6:35 Comment(0)
R
1

Or set your PATH in environment variables to C:\Progra~2\Ruby\Ruby193\bin instead of C:\Program Files\Ruby\Ruby193\bin

Progra~1 should be Program Files, Progra~2 should be Program Files (x86)

Richardo answered 30/9, 2012 at 16:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.