ERROR: Failed to build gem native extension (win server 2003/2008 ruby 1.9.1/1.8.7)

I am trying to install mongrel_service gem on Windows (although this
problem seems to hold for any non-compiled gem). I have tried this
with Windows Server 2003 and 2008. Also with Ruby version 1.8.7 and
1.9.1 (Luis L.'s one click installer). Both with the same result.
The error message (full text below) mentions that I have to install
development tools first. I have installed MinGW and MSYS and placed
the MinGW bin into my windows path (even though I thought that the
purpose of the one click ruby installer was to also include necessary
tools to compile gems that need it).

I am about to tell my company to forget about windows, but before I
do, has anyone made it through this?

c:>gem install mongrel_service --include-dependencies --no-rdoc --no-
ri
INFO: gem install -y is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Building native extensions. This could take a while…
ERROR: Error installing mongrel_service:
ERROR: Failed to build gem native extension.

C:/Ruby191/bin/ruby.exe extconf.rb
checking for RegisterServiceCtrlHandlerEx()… *** 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:
–with-opt-dir
–without-opt-dir
–with-opt-include
–without-opt-include=${opt-dir}/include
–with-opt-lib
–without-opt-lib=${opt-dir}/lib
–with-make-prog
–without-make-prog
–srcdir=.
–curdir
–ruby=C:/Ruby191/bin/ruby
C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:364:in try_do': The complier failed to genera te an executable file. (RuntimeError) You have to install development tools first. from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:417:intry_link0’
from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:421:in try_link' from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:529:intry_func’
from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:774:in block in have_func' from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:670:inblock in
checking_for’
from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:276:in block (2 levels) in postp one' from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:250:inopen’
from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:276:in block in postpone' from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:250:inopen’
from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:272:in postpone' from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:669:inchecking_for’
from C:/Ruby191/lib/ruby/1.9.1/mkmf.rb:773:in have_func' from extconf.rb:7:in

Gem files will remain installed in C:/Ruby191/lib/ruby/gems/1.9.1/gems/
win32-ser
vice-0.5.2 for inspection.
Results logged to C:/Ruby191/lib/ruby/gems/1.9.1/gems/win32-
service-0.5.2/gem_ma
ke.out

c:>

try this:
gem install mongrel_service --platform i386-mswin32

For me works perfect!

Hello:

I am trying to run the hello_world app. I followed instructions here:
gem install mongrel_service --platform i386-mswin32 and the mongrel
service was installed.

However when I tried to run hello_world>sc-server I received the
following error:

FATAL RubyGem version error: mongrel(1.1.5 not >=0)

Please help.

Thanks!

On Fri, Apr 1, 2011 at 3:43 PM, seeker 7805 [email protected]
wrote:

What version of Rails are you using? If you are using Rails 3 you need
to
intall the bundle (type ‘bundle install’ in the console).

David K. wrote in post #990488:

On Fri, Apr 1, 2011 at 3:43 PM, seeker 7805 [email protected]
wrote:

What version of Rails are you using? If you are using Rails 3 you need
to
intall the bundle (type ‘bundle install’ in the console).

Hi David: Thanks for your reply. I typed in ‘bundle install’ and I
received a ‘Could not locate Gemfile’ message.

I am using Rails 3.0.5 on windows xp

Sometimes I have to install the gem in the can and line to load the
gem on my windows machine and then ‘bundle install’ works.

I have also written this post in windows and rails 3.
http://johnivanoff.blogspot.com/2010/09/ruby-192-rails-3-clean-install-on.html

Cheers,
John I.

I’ve registered for the Bike MS: SAM’S CLUB Ride to fulfill a personal
challenge, and also to help the National MS Society fund research,
advocate for change and help people with MS and their families lead
powerful lives. I believe in the work they do and want to be part of
it.

http://main.nationalmssociety.org/site/TR/Bike/TXHBikeEvents?px=5933747&pg=personal&fr_id=16031

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