我最近添加了清理sanitize gem,它似乎依赖于nokogumbo gem到我在Heroku上部署的网站。不幸的是,在安装sanitize之后,我开始在Heroku部署上收到以下错误:
/app/vendor/bundle/ruby/2.3.0/gems/activesupport-5.0.3/lib/active_support/dependencies.rb:293:in `require': /tmp/build_4dbcff4c3c5e0bb6bed481077377225e/vendor/bundle/ruby/2.3.0/gems/nokogiri-1.7.2/ext/nokogiri/nokogiri.so: cannot open shared object file: No such file or directory - /app/vendor/bundle/ruby/2.3.0/gems/nokogumbo-1.4.12/lib/nokogumboc.so (LoadError)
没有nokogumbo-1.4.12目录,但一切都在本地工作正常。我试过手动安装宝石,但我仍然收到同样的错误。任何修复建议都将非常感谢!
答案 0 :(得分:3)
这似乎是nokogumbo gem的一个问题。 https://github.com/rubys/nokogumbo/issues/25
"降级到nokogumbo 1.4.11修复了Heroku的部署,所以有些事情肯定会出现。 问题出现在cedar-14(Ubuntu 14 LTS)和heroku-16(Ubuntu 16 LTS)堆栈上。"
关于如何在此问题得到解决之前解决此问题的建议是将nokogumbo降级为%{
#include <string.h>
#include <parser.tab.h>
#define YY_EXTRA_TYPE char**
/* FIXME:
* This assumes that none of the string segments are empty
* strings (or for the feature-not-a-bug interpretation,
* it allows the list to be terminated by NULL or an empty string).
*/
#define YY_INPUT(buf,result,max_size) { \
char* segment = *yyextra; \
if (segment == NULL) result = 0; \
else { \
size_t avail = strnlen(segment, max_size); \
memcpy(buf, segment, avail); \
if (segment[avail]) *yyextra += avail; \
else ++yyextra; \
result = avail; \
} \
}
%}
%option reentrant bison-bridge
%option noinput nounput nodefault noyywrap
%%
[[:space:]]+ ;
[0-9]+ { yylval->number = strtol(yytext, 0, 10); return NUMBER; }
[[:alpha:]_][[:alnum:]_]* { yylval->string = strdup(yytext); return ID; }
. { return *yytext; }
%%
/* This function must be exported in some header */
void yylex_strings(char** argv, yyscan_t scanner) {
yyset_extra(argv, scanner);
}
。
1.4.11