- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 AWS Elastic Beanstalk 部署我的 Rails 应用程序。我已经创建了实例,但是当我尝试使用 aws.push
部署应用程序时,我在事件日志中收到以下错误:
2014-09-22 01:23:40 UTC+0550 ERROR [Instance: i-744edb4a Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 Output: Error occurred during build: Command hooks failed .
2014-09-22 01:23:39 UTC+0550 ERROR Script /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed with returncode 5
nokogiri
gem的安装失败了,报错:
-------------------------------------
/var/log/directory-hooks-executor.log
-------------------------------------
Using mail 2.5.4
Using actionmailer 4.0.2
Using active_utils 2.2.1
Using json 1.8.1
Using money 6.1.1
Using mini_portile 0.6.0
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9 extconf.rb
Building nokogiri using packaged libraries.
checking for iconv.h... yes
checking for iconv_open() in iconv.h... yes
Building libxml2-2.8.0 for nokogiri with the following patches applied:
- 0001-Fix-parser-local-buffers-size-problems.patch
- 0002-Fix-entities-local-buffers-size-problems.patch
- 0003-Fix-an-error-in-previous-commit.patch
- 0004-Fix-potential-out-of-bound-access.patch
- 0005-Detect-excessive-entities-expansion-upon-replacement.patch
- 0006-Do-not-fetch-external-parsed-entities.patch
- 0007-Enforce-XML_PARSER_EOF-state-handling-through-the-pa.patch
- 0008-Improve-handling-of-xmlStopParser.patch
- 0009-Fix-a-couple-of-return-without-value.patch
- 0010-Keep-non-significant-blanks-node-in-HTML-parser.patch
- 0011-Do-not-fetch-external-parameter-entities.patch
************************************************************************
IMPORTANT! Nokogiri builds and uses a packaged version of libxml2.
If this is a concern for you and you want to use the system library
instead, abort this installation process and reinstall nokogiri as
follows:
gem install nokogiri -- --use-system-libraries
If you are using Bundler, tell it to use the option:
bundle config build.nokogiri --use-system-libraries
bundle install
However, note that nokogiri does not necessarily support all versions
of libxml2.
For example, libxml2-2.9.0 and higher are currently known to be broken
and thus unsupported by nokogiri, due to compatibility problems and
XPath optimization bugs.
************************************************************************
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-redhat-linux-gnu/ports/libxml2/2.8.0... OK
Running patch with /usr/local/share/gems1.9/gems/nokogiri-1.6.2.1/ports/patches/libxml2/0001-Fix-parser-local-buffers-size-problems.patch...
Running 'patch' for libxml2 2.8.0... ERROR, review 'tmp/x86_64-redhat-linux-gnu/ports/libxml2/2.8.0/patch.log' to see what happened.
*** 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}/
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby1.9
--help
--clean
--use-system-libraries
--enable-static
--disable-static
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--enable-cross-build
--disable-cross-build
/usr/local/share/gems1.9/gems/mini_portile-0.6.0/lib/mini_portile.rb:279:in `block in execute': Failed to complete patch task (RuntimeError)
from /usr/local/share/gems1.9/gems/mini_portile-0.6.0/lib/mini_portile.rb:271:in `chdir'
from /usr/local/share/gems1.9/gems/mini_portile-0.6.0/lib/mini_portile.rb:271:in `execute'
from extconf.rb:282:in `block in patch'
from extconf.rb:279:in `each'
from extconf.rb:279:in `patch'
from /usr/local/share/gems1.9/gems/mini_portile-0.6.0/lib/mini_portile.rb:108:in `cook'
from extconf.rb:253:in `block in process_recipe'
from extconf.rb:154:in `tap'
from extconf.rb:154:in `process_recipe'
from extconf.rb:419:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /usr/local/share/gems1.9/gems/nokogiri-1.6.2.1 for inspection.
Results logged to /usr/local/lib64/gems1.9/exts/nokogiri-1.6.2.1/gem_make.out
An error occurred while installing nokogiri (1.6.2.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.6.2.1'` succeeds before bundling.
2014-09-21 19:53:39,643 [ERROR] (321 MainThread) [directoryHooksExecutor.py-33] [root directoryHooksExecutor error] Script /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed with returncode 5
.ebextensions/packages.conf
中:
packages:
yum:
postgresql-devel: []
git: []
gcc: []
libxml2: []
libxml2-devel: []
libxslt: []
libxslt-devel: []
最佳答案
我可以通过在要安装的软件包列表中包括patch
来解决此问题:)
像这样:
packages:
yum:
postgresql-devel: []
git: []
patch: []
关于ruby-on-rails - Elastic Beanstalk 上的 Nokogiri 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25963315/
我在 OSX 上使用 RVM 和之前的 RBENV。我在 ./gems 中相对于我的项目路径安装了我的 gems 我正在使用 aws-sdk 并尝试使用 s3 客户端导致 nokogiri/nokog
我正在尝试使用以下版本在 Mac OS Big Sur 上构建 Rails 应用程序...... $ rails --version Rails 5.0.7.2 $ ruby --version ru
我正在尝试抓取 http://www.ign.com/games/reviews使用 Nokogiri,我想实例化与页面上每个游戏评论相对应的新评论对象。当然,我还想从每条评论中获取每个数字分数,并将
我正在编写 Lynda 的 Ruby on Rails 教程,一切都按预期进行。所有安装和一切都运行完美。 但是创建项目后,当我尝试启动服务器(cmd:rails server)时,我收到错误消息:
尝试按如下方式在生产模式下运行 rake Assets 预编译。 rake assets:precompile 它在 ubuntu 14.04(32 位)和 16.06(32 位)上运行良好。但是在
我需要一种方法来运行 nokogiri 脚本 #parser.rb require 'nokogiri' def parseit() //... end 并在 jruby 的 main.rb 下面运行
在解析缩进的 XML 时,不重要的空白文本节点是从结束标记和开始标记之间的空白创建的。例如,来自以下 XML: Tove Jani Reminder Don't forget me
Nokogiri 在我的 gem 文件中。 bundle 安装返回预期的输出: Using nokogiri (1.4.4) Your bundle is complete! Use `bundle
我安装了 Ruby 和 Nokogiri gem。在 irb 中,我尝试: require 'nokogiri' require 'open-uri' url = 'http://www.amazon
我想使用 XSL 将 XML 文档转换为 HTML,稍微修改一下,然后将其呈现出来。这基本上就是我正在做的: source = Nokogiri::XML(File.read 'source.xml'
我的 Ruby on Rails 应用程序使用 Rails 2.2.2 和 Ruby 1.8.7。 尝试运行时 RAILS_ENV=production rake gems:install 或任何佣金
在 IRB 中,当我键入 require“nokogiri”时,出现以下错误: LoadError: cannot load such file -- nokogiri 我的 gemfile 中安装了
我正在使用 DevKit 在 Windows 8.1 上运行全新安装的 Ruby 2.2.1。安装后我运行: gem install rails rails new testapp cd testap
我正在尝试安装 nokogiri,因为它是启动 rails 所必需的 $ rails s /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/bun
我终于设法解析了网站的部分内容: get '/' do url = '' data = Nokogiri::HTML(open(url)) @rows = data.css("td[val
我第一次使用 Nokogiri 搜索 HTML 文档。当我创建一个变量(并打印)时,它等于: beteween Nokogiri::HTML(open(url).read) 它似乎输出与完全相同的东西
如果我尝试安装 nokogiri,我会收到以下错误: rvmsudo gem install nokogiri ERROR: Error installing nokogiri: nokog
我在屏幕抓取 rake 任务中有以下代码 page = agent.get("https://domainname.co.uk/unit/27/logs?type=incoming&page=8")
我尝试(出于测试目的)解析 Google 商家 XML 提要,定义为: EasyOptic 2014-08-01T16:31:
如何将“foo”替换为“bar”? 来自 foo1foo2foo4foo5foo6 至 bar1bar2bar4bar5bar6 我只想替换标签内部内容,没有标签属性。 有什么想法吗? 最佳答案 re
我是一名优秀的程序员,十分优秀!