Prev: building ruby from source
Next: FileSet 0.1 Released
From: Augusto Esteves on 27 Dec 2009 22:43 I'm new to Ruby and I was wondering if every gem that works on Ruby for Linux works on Ruby for Windows. I'm trying to install both the rake (as a test) and the nfc gems on Windows, but with both I'm getting: c:\ruby>gem install nfc ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find nfc (> 0) in any repository -- Posted via http://www.ruby-forum.com/.
From: Phillip Gawlowski on 27 Dec 2009 23:10 On 28.12.2009 04:43, Augusto Esteves wrote: > I'm new to Ruby and I was wondering if every gem that works on Ruby > for Linux works on Ruby for Windows. Short answer: No. Long answer: It depends. *If* you use the RubyInstaller from rubyinstaller.org *and* the devkit offered there (simply extract the .7z into your Ruby installation folder, by default C:\Ruby), then Gems requiring native extensions *could* work, if no binary gem is offered. -- Phillip Gawlowski
From: Augusto Esteves on 28 Dec 2009 00:00 Phillip Gawlowski wrote: > *If* you use the RubyInstaller from rubyinstaller.org *and* the devkit > offered there (simply extract the .7z into your Ruby installation > folder, by default C:\Ruby), then Gems requiring native extensions > *could* work, if no binary gem is offered. I've followed your instructions and I was able to get somewhere :) After it starts building the native extensions I get a bunch of errors that are related to a library I need to run this gem, which is the libnfc. I have the binaries for this library, is there a way of letting the Gem installer know how to get the files it needs? -- Posted via http://www.ruby-forum.com/.
From: Phillip Gawlowski on 28 Dec 2009 00:16 On 28.12.2009 06:00, Augusto Esteves wrote: > I've followed your instructions and I was able to get somewhere :) After > it starts building the native extensions I get a bunch of errors that > are related to a library I need to run this gem, which is the libnfc. > > I have the binaries for this library, is there a way of letting the Gem > installer know how to get the files it needs? The MinGW compiler used by ruby needs to know where the *header* files are to get them. My guess is that you need the source for libnfc, and add their path to your your %path% environment variable (if only temporarily), by doing something like "set path = %path%;C:\Path\To\Header\Files", and then "gem install". Mind, this doesn't guarantee, at all, that your gem will work. Or even that the libnfc you have works (the lib has to be compiled for windows, with a compiler compatible to MinGW32's gcc3.4 to be usable by Ruby), *and* the header files have to be usable for Windows, too. Linux and Windows platforms are *not* compatible to each other, so unless you know your way around C, and can fix the errors gcc/gem hands you, you'll either have to fix the errors yourself, or lobby the libnfc/nfc-gem maintainers to fix the issue (if, indeed, this is an issue for them in the first place). -- Phillip Gawlowski
From: Regis Aubarede on 28 Dec 2009 07:44
Augusto Esteves wrote: > c:\ruby>gem install nfc > ERROR: While executing gem ... (Gem::GemNotFoundException) > Could not find nfc (> 0) in any repository that resolve the first issue : >gem install os then you will get second issue : .... ERROR: Failed to build gem native extension. .... I have not found solution for this one ! by -- Posted via http://www.ruby-forum.com/. |