首页 文章

Ruby on Rails教程,Ch.3 Gemfile错误

提问于
浏览
0

我正在研究这个教程:http://ruby.railstutorial.org/chapters/static-pages#top ...你可以[ctrl f]到 Listing 3.1. A Gemfile for the sample app 找到我的位置 .

我只是复制并粘贴了那里给出的gemfile(它不起作用,所以我继续尝试从[ctrl f]点上方链接的10.42中的那个,因为我必须在反正有点 . )

对于10.42列表,它给了我一个错误, Could not find gem 'will_paginate (= 3.0.pre2) ruby' in the gems available on this machine .

  • Rails是3.0.11版

  • Ruby版本:1.8.7(2012-02-08 patchlevel 358)[i386-cygwin]

以下是终端的复制粘贴,显示错误 . 这里的格式很糟糕,所以我也把它放在这里的Google文档页面上:https://docs.google.com/document/d/1SJsfIOtKKR2Rb228kgfpTdpYhGsWLCwfkORXJA1qYBs/edit


Brian @ RobCo_Terminal / home / brian / sample_app $ rails生成rspec:install无法找到宝石'will_paginate(= 3.0.pre2)ruby'在机器上可用的宝石中 . 运行bundle install以安装缺少的gem . Brian @ RobCo_Terminal / home / brian / sample_app $ bundle install从rubygems.org获取gem元数据/ .......使用rake(0.9.2.2)使用abstract(1.0.0)使用activesupport(3.0.11)使用builder (2.1.2)使用i18n(0.5.0)使用activemodel(3.0.11)使用erubis(2.6.6)使用机架(1.2.5)使用机架安装(0.6.14)使用机架测试(0.5.7) )使用tzinfo(0.3.32)使用actionpack(3.0.11)使用mime-types(1.17.2)使用polyglot(0.3.3)使用treetop(1.4.10)使用mail(2.2.19)使用actionmailer(3.0 . 11)使用arel(2.0.10)使用activerecord(3.0.11)使用activeresource(3.0.11)使用注释(2.4.0)使用bundler(1.1.0)使用diff-lcs(1.1.3)使用factory_girl(1.3) .3)使用json(1.6.5)使用rdoc(3.12)使用thor(0.14.6)使用railties(3.0.11)使用rails(3.0.11)使用factory_girl_rails(1.0)使用faker(0.3.1)使用gravatar_image_tag (1.0.0.pre2)使用本机扩展安装nokogiri(1.5.2)3 [main] ruby 7644 child_info_fork :: abort:'etc.so'所需的地址空间( 0x110000)已被占用3 [main] ruby 6352 child_info_fork :: abort:'etc.so'所需的地址空间(0x110000)已被占用3 [main] ruby 1524 child_info_fork :: abort:'etc.so所需的地址空间'(0x110000)已被占用不幸的是,发生了致命错误 . 请将此错误报告给github.com/carlhuda/bundler/issues上的Bundler问题跟踪器,以便我们对其进行修复 . 谢谢! /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in“build_extensions”:错误:无法构建gem原生扩展 . (Gem :: Installer :: ExtensionBuildError)/usr/bin/ruby.exe extconf.rb 17 [main] ruby 7892 child_info_fork :: abort:'etc.so'所需的地址空间(0x2E0000)已被占用5 [main] ruby 7128 child_info_fork :: abort:'etc.so'所需的地址空间(0x2E0000)已被占用4 [main] ruby 7568 child_info_fork :: abort:'etc.so'所需的地址空间(0x2E0000)已被占用4 [ main] ruby 3196 child_info_fork :: abort:'etc.so'所需的地址空间(0x2E0000)已被占用26 [main] ruby 2260 child_info_fork :: abort:'etc.so'所需的地址空间(0x2E0000)已被占用4 [main] ruby 6852 child_info_fork :: abort:'etc.so'(0x2E0000)所需的地址空间已经被占用检查libxml / parser.h ...没有缺少libxml2 . 请访问nokogiri.org/tutorials/installing_nokogiri.html以获取有关安装依赖项的帮助 . * extconf.rb失败*由于某些原因无法创建Makefile,可能缺少必要的库和/或标头 . 检查mkmf.log文件以获取更多详细信息 . 您可能需要配置选项 . 提供的配置选项: - with-opt-dir --without-opt-dir --with-opt-include --without-opt-include = $ / include --with-opt-lib - without-opt-lib = $ / 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 = $ / include --with-zlib-lib --without-zlib-lib = $ / lib --with-iconv-dir --without-iconv-dir --with-iconv-include --without-iconv- include = $ / include --with-iconv-lib --without-iconv-lib = $ / lib --with-xml2-dir --without-xml2-dir --with -xml2-include --without-xml2-include = $ / include --with-xml2-lib --without-xml2-lib = $ / lib --with-xslt-dir --without-xslt-dir --with-xslt-include --without-xslt-include = $ / include --with-xslt-lib --without-xslt-lib = $ {xslt-dir / lib Gem文件将保留在/usr/lib/ruby/gems/1.8/gems/nokogiri-1.5.2中进行检查 . 记录结果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'来自/ usr / lib的/usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:inbuild_extensions'来自/usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb:198:in install' /ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/source.rb:90:ininstall'来自/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:来自/usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/installer.rb:72:in,_,,,,, 1.8 / gems / bundler-1.1.0 / lib / bundler / installer.rb:56:inrun'来自/usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib /bundler/installer.rb:55:in从/ usr / lib /运行'from /usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/installer.rb:12:ininstall' 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'来自/usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler/vendor/thor/task.rb:22:in run'来自/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:来自/usr/lib/ruby/gems/1.8/gems/bundler-1.1.0/bin/bundle:13的instart'来自/ usr / bin / bundle:19:来自/ usr /的`load'箱/捆扎:19

1 回答

  • 0

    具有原生扩展(C代码)的宝石除了在Windows上安装它们时还需要ruby devkit .

    RubyInstaller开发工具包(DevKit)是一个基于MSYS / MinGW的工具包,它使您能够构建许多可用于Ruby的本机C / C扩展 .

相关问题