0
votes

I'm working on this tutorial: http://ruby.railstutorial.org/chapters/static-pages#top ...You can [ctrl+f] to Listing 3.1. A Gemfile for the sample app to find where I am.

I just copy and pasted the gemfile as it is given there (it didn't work, so I went ahead and tried the one from 10.42 as is linked immediately above the [ctrl+f] spot, since I'll have to use that at some point anyways.)

For the 10.42 listing, it is giving me an error, Could not find gem 'will_paginate (= 3.0.pre2) ruby' in the gems available on this machine.

  • Rails is version 3.0.11
  • Ruby is version: 1.8.7 (2012-02-08 patchlevel 358) [i386-cygwin]

What follows is a copy-paste from the terminal which shows the errors. The formatting is terrible here, so I have also put it on a Google Docs page located here: https://docs.google.com/document/d/1SJsfIOtKKR2Rb228kgfpTdpYhGsWLCwfkORXJA1qYBs/edit


Brian@RobCo_Terminal /home/brian/sample_app $ rails generate rspec:install Could not find gem 'will_paginate (= 3.0.pre2) ruby' in the gems available on th is machine. Run bundle install to install missing gems.

Brian@RobCo_Terminal /home/brian/sample_app $ bundle install Fetching gem metadata from rubygems.org/....... Using rake (0.9.2.2) Using abstract (1.0.0) Using activesupport (3.0.11) Using builder (2.1.2) Using i18n (0.5.0) Using activemodel (3.0.11) Using erubis (2.6.6) Using rack (1.2.5) Using rack-mount (0.6.14) Using rack-test (0.5.7) Using tzinfo (0.3.32) Using actionpack (3.0.11) Using mime-types (1.17.2) Using polyglot (0.3.3) Using treetop (1.4.10) Using mail (2.2.19) Using actionmailer (3.0.11) Using arel (2.0.10) Using activerecord (3.0.11) Using activeresource (3.0.11) Using annotate (2.4.0) Using bundler (1.1.0) Using diff-lcs (1.1.3) Using factory_girl (1.3.3) Using json (1.6.5) Using rdoc (3.12) Using thor (0.14.6) Using railties (3.0.11) Using rails (3.0.11) Using factory_girl_rails (1.0) Using faker (0.3.1) Using gravatar_image_tag (1.0.0.pre2) Installing nokogiri (1.5.2) with native extensions 3 [main] ruby 7644 child_info_fork::abort: address space needed by 'etc.so' (0x110000) is already occupied 3 [main] ruby 6352 child_info_fork::abort: address space needed by 'etc.so' (0x110000) is already occupied 3 [main] ruby 1524 child_info_fork::abort: address space needed by 'etc.so' (0x110000) is already occupied Unfortunately, a fatal error has occurred. Please report this error to the Bundler issue tracker at github.com/carlhuda/bundler/issues so that we can fix it. Thanks! /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/usr/bin/ruby.exe extconf.rb 17 [main] ruby 7892 child_info_fork::abort: address space needed by 'etc.so' (0x2E0000) is already occupied 5 [main] ruby 7128 child_info_fork::abort: address space needed by 'etc.so' (0x2E0000) is already occupied 4 [main] ruby 7568 child_info_fork::abort: address space needed by 'etc.so' (0x2E0000) is already occupied 4 [main] ruby 3196 child_info_fork::abort: address space needed by 'etc.so' (0x2E0000) is already occupied 26 [main] ruby 2260 child_info_fork::abort: address space needed by 'etc.so' (0x2E0000) is already occupied 4 [main] ruby 6852 child_info_fork::abort: address space needed by 'etc.so' (0x2E0000) is already occupied checking for libxml/parser.h... no libxml2 is missing. please visit nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.

* 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=/usr/bin/ruby --with-zlib-dir --without-zlib-dir --with-zlib-include --without-zlib-include=${zlib-dir}/include --with-zlib-lib --without-zlib-lib=${zlib-dir}/lib --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv-include=${iconv-dir}/include --with-iconv-lib --without-iconv-lib=${iconv-dir}/lib --with-xml2-dir --without-xml2-dir --with-xml2-include --without-xml2-include=${xml2-dir}/include --with-xml2-lib --without-xml2-lib=${xml2-dir}/lib --with-xslt-dir --without-xslt-dir --with-xslt-include --without-xslt-include=${xslt-dir}/include --with-xslt-lib --without-xslt-lib=${xslt-dir}/lib

Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.2 for inspection. Results logged to /usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.2/ext/nokogiri/gem_make.out from /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in each' from /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:inbuild_extensions' from /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:198:in install' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/source.rb:90:ininstall' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/rubygems_integration.rb:82:in preserve_paths' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/source.rb:89:ininstall' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/installer.rb:73:in install_gem_from_spec' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/rubygems_integration.rb:97:inwith_build_args' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/installer.rb:72:in install_gem_from_spec' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/installer.rb:56:inrun' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/installer.rb:55:in run' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/installer.rb:12:ininstall' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/cli.rb:220:in install' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/thor/task.rb:22:insend' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/thor/task.rb:22:in run' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/thor/invocation.rb:118:ininvoke_task' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/thor.rb:263:in dispatch' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/thor/base.rb:386:instart' from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/bin/bundle:13 from /usr/bin/bundle:19:in `load' from /usr/bin/bundle:19

1
Developing ruby-on-rails applications on windows can be painful, please consider using mac or linux. If you don't want to install linux directly, may I suggest installing it on virtual machine. This will greatly speed up your learning process.Valentin V

1 Answers

0
votes

Gems with native extensions (C code) often require ruby devkit besides mingw when installing them on Windows.

The RubyInstaller Development Kit (DevKit) is a MSYS/MinGW based toolkit than enables you to build many of the native C/C++ extensions available for Ruby.