Problem with gems, Windows, C extension

Hi all,

Ruby 1.8.4 (one click)
gems 0.9.0

I’ve got a C extension that I’m trying to install via gems on my Windows
called ‘net-proto’. I can build and install the gem locally with no
problem. However, when I try to install it remotely I get this error:

C:\ruby\src>gem install net-proto
Building native extensions. This could take a while…
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:

ERROR: While executing gem … (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/net-
proto-1.0.1 for inspection.

I definitely have cl in my %PATH% so I’m not sure why it’s not picking

C:>cl -v
Microsoft ® 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for
Copyright © Microsoft Corp 1984-1998. All rights reserved.

There is no mkmf.log and the gem_make.out file is empty. Below is the
gemspec I used to build the gem currently on RubyForge:

require “rubygems”

summary = "The net-proto package provides the getprotobyname(), "
summary += “getprotobynumber() and the getprotoent() methods for Ruby.”

spec = do |gem| = “net-proto”
gem.version = “1.0.1” = “Daniel J. Berger” = “[email protected]
gem.homepage = “
gem.platform = Gem::Platform::RUBY
gem.summary = summary
gem.description = summary
gem.test_file = “test/tc_netproto.rb”
gem.has_rdoc = true
gem.extra_rdoc_files = [“CHANGES”,“README”]
gem.rubyforge_project = “sysutils”
files = Dir[“doc/"] + Dir["test/”] + Dir["[A-Z]*"]
files.delete_if{ |item| item.include?(“CVS”) }
gem.files = files

if $0 == FILE
spec.required_ruby_version = ‘>= 1.8.0’
spec.extensions = [“extconf.rb”]

when /win32|windows|mingw|cygwin/i
file = ‘lib/net/windows.c’
when /linux/i
file = ‘lib/net/linux.c’
when /sunos|solaris/i
file = ‘lib/net/sunos.c’
file = ‘lib/net/generic.c’

spec.files += [‘lib/version.h’, file]


Any ideas?



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs