sdsykes / slim_scrooge

SlimScrooge heavily optimises your database interactions
313 stars 25 forks source link

Gem fails to install under windows #2

Closed ygor closed 14 years ago

ygor commented 14 years ago

Hi, when I try to install this gem under windows, it fails with the message:

"ERROR: Failed to build gem native extension."

and

"make 'nmake' is not recognized as an internal or external command, operable program or batch file."

Do you perhaps know of any solution to this problem (other than not using windows :) ?

sdsykes commented 14 years ago

It would be nice to get this going under windows.

What Ruby do you have installed? And what C compiler do you have installed (if any)?

sdsykes commented 14 years ago

Hi, I have installed ruby version 1.8.6 and havent installed any C compiler. How would you suggest I proceed?

Please try to install the version I just released, 1.0.3. You will still get the error message, but SlimScrooge should still work even without the C extension. Let me know if it works!

BoomerBrian commented 14 years ago

It still doesn't work on windows.

nkirkes commented 14 years ago

Was there a resolution to this? New to the Ruby/Rails world, having trouble getting dependent project started (RefineryCMS). I'm getting the exact same error.

nkirkes commented 14 years ago

For what it's worth, I found nmake under the Visual Studio installation path (C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin in my case), which I had to add to my PATH variable to get it to recognize. I get another error now, but that's should be in a different thread.

sdsykes commented 14 years ago

The current answer is that I can reproduce this, but fixing it somehow in the gem build process seems impossible. If I can't find a fix I will make a separate gem for windows.

What error do you get with nmake?

sdsykes commented 14 years ago

Try downloading and installing this gem on windows: http://pennysmalls.com/gems/slim_scrooge-1.0.4.gem

nkirkes commented 14 years ago

Huh, downloaded and installed locally and it ran just fine.

sdsykes commented 14 years ago

Yes, if you install the gem directly from the download I gave above (ie gem install slim_scrooge-1.0.4.gem) then it should work.

nkirkes commented 14 years ago

Yup, that's what happened. What was the difference, out of curiosity? Was there a change in that particular package, or...

sdsykes commented 14 years ago

The difference is that in this version I have omitted the compiled C extension that calculates the 'callsite' - so it will fall back to the ruby method. It's a little bit slower to do that, but slim_scrooge should still perform well.

nkirkes commented 14 years ago

Srsly, thanks for your help. It's refreshing to talk to people who give a shit.