0
votes

I have ruby 2.4.0 . I need to install libxml-ruby with same version. I did install the default libxml-ruby but still while running ruby script I am getting below error: C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in ``require': cannot load such file -- libxml_ruby (LoadError)

Ruby version: ruby 2.4.10p364 (2020-03-31 revision 67879) [x64-mingw32]

Below is the gem list : bigdecimal (default: 1.3.2) bundler (2.2.7) cmath (1.0.0) deep_merge (1.2.1) did_you_mean (1.1.0) happymapper (0.5.0) io-console (default: 0.4.6) json (2.5.1, default: 2.0.4) libxml-ruby (2.9.0 x64-mingw32) mini_portile2 (2.4.0, 2.3.0) minitest (5.10.1) net-telnet (0.1.1) nokogiri (1.10.9 x64-mingw32, 1.8.4 x64-mingw32) openssl (default: 2.0.9) power_assert (0.4.1) psych (default: 2.2.2) racc (1.5.2) rake (12.0.0) rdoc (default: 5.0.1) test-unit (3.2.3) xmlrpc (0.2.1) zlib (1.0.0)

1

1 Answers

0
votes

Try replacing on your gemfile the line gem 'libxml-ruby' for gem 'libxml-ruby', '< 3.1' to limit gem version. I had this same problem and I solved it using a lower version than 3.1 of the gem.

Run bundle after this change and run rails again.