gpt4 book ai didi

ruby-on-rails - LoadError : incompatible library version -/home/ubuntu/. rvm/gems/ruby-2.3.1@lm5/gems/nokogiri-1.8.2/lib/nokogiri/nokogiri.so

转载 作者:行者123 更新时间:2023-12-04 06:20:53 26 4
gpt4 key购买 nike

尝试按如下方式在生产模式下运行 rake Assets 预编译。

rake assets:precompile

它在 ubuntu 14.04(32 位)和 16.06(32 位)上运行良好。但是在 aws ec2 中的 16.04(64 位)上出现加载错误。

请帮我解决这个问题。

提前致谢。

这是我的完整堆栈跟踪

rake aborted! LoadError: incompatible library version - /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/nokogiri-1.8.2/lib/nokogiri/nokogiri.so /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/nokogiri-1.8.2/lib/nokogiri.rb:32:in rescue in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/nokogiri-1.8.2/lib/nokogiri.rb:28:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/loofah-2.2.2/lib/loofah.rb:3:in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in block in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/rails-html-sanitizer-1.0.4/lib/rails-html-sanitizer.rb:2:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers/sanitize_helper.rb:2:in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in block in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:58:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:4:in <module:ActionView>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:3:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/base.rb:5:in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in block in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity/utility/view_helpers.rb:25:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity/utility/view_helpers.rb:2:in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in block in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity.rb:68:in
' /home/ubuntu/learnmusicco/config/application.rb:7:in <top
(required)>' /home/ubuntu/learnmusicco/Rakefile:4:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/rake-12.3.1/exe/rake:27:in `'

Caused by: LoadError: cannot load such file -- nokogiri/2.3/nokogiri /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/nokogiri-1.8.2/lib/nokogiri.rb:30:in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in block in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/loofah-2.2.2/lib/loofah.rb:3:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/rails-html-sanitizer-1.0.4/lib/rails-html-sanitizer.rb:2:in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in block in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers/sanitize_helper.rb:2:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:58:in <module:Helpers>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:4:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/helpers.rb:3:in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in block in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in
load_dependency' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/actionview-5.0.1/lib/action_view/base.rb:5:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity/utility/view_helpers.rb:25:in <module:PublicActivity>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity/utility/view_helpers.rb:2:in
' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in require'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
block in require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in load_dependency'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in
require' /home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/public_activity-1.5.0/lib/public_activity.rb:68:in <top (required)>'
/home/ubuntu/learnmusicco/config/application.rb:7:in
' /home/ubuntu/learnmusicco/Rakefile:4:in <top
(required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.1@lm5/gems/rake-12.3.1/exe/rake:27:in
'

最佳答案

您可以尝试运行 gem pristine --all 来自动卸载并重新安装当前环境中所有已安装的 gem。这可能会解决您的问题。

如果这不起作用,请尝试运行 rm -rf `rvm gemdir`/bundler/gems 以强行删除所有 gem,然后尝试另一个 bundle install .

关于ruby-on-rails - LoadError : incompatible library version -/home/ubuntu/. rvm/gems/ruby-2.3.1@lm5/gems/nokogiri-1.8.2/lib/nokogiri/nokogiri.so,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50100264/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com