Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby fog gem causing server not to run: cannot load such file -- xmlrpc/client (LoadError)

As the title states, I'm trying to set up an Ubuntu 16.04 system for working on rails apps. When I comment out the fog gem, the server starts locally, and with the gem left in it produces the error message below. Googling doesn't seem to provide anything as I can't find anyone else with the same error as me, and I cannot simply remove the gem from the app as it's needed.

The full message is as below:

/home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require': cannot load such file -- xmlrpc/client (LoadError)
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/fog-1.28.0/lib/fog/xenserver/core.rb:15:in `<class:Connection>'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/fog-1.28.0/lib/fog/xenserver/core.rb:14:in `<module:XenServer>'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/fog-1.28.0/lib/fog/xenserver/core.rb:5:in `<module:Fog>'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/fog-1.28.0/lib/fog/xenserver/core.rb:4:in `<top (required)>'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/fog-1.28.0/lib/fog/xenserver/compute.rb:1:in `<top (required)>'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/fog-1.28.0/lib/fog/xenserver.rb:1:in `<top (required)>'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `block in require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:259:in `load_dependency'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/activesupport-5.0.1/lib/active_support/dependencies.rb:293:in `require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/fog-1.28.0/lib/fog.rb:63:in `<top (required)>'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.0/lib/bundler/runtime.rb:91:in `require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.0/lib/bundler/runtime.rb:91:in `block (2 levels) in require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.0/lib/bundler/runtime.rb:86:in `each'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.0/lib/bundler/runtime.rb:86:in `block in require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.0/lib/bundler/runtime.rb:75:in `each'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.0/lib/bundler/runtime.rb:75:in `require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/bundler-1.14.0/lib/bundler.rb:107:in `require'
from /home/mark/projects/walkabout/config/application.rb:7:in `<top (required)>'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:88:in `require'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:88:in `block in server'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:85:in `tap'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:85:in `server'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.0.1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
from /home/mark/.rvm/gems/ruby-2.4.0/gems/railties-5.0.1/lib/rails/commands.rb:18:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

If anyone can tell me how to either download / install the xmlrpc client or work around the issue that would be appreciated.

like image 725
Mark Avatar asked Jan 21 '17 20:01

Mark


1 Answers

So the problem is that starting in Ruby 2.4.0, the xmlrpc library that was before bundled with ruby has been extracted to a gem. So you must just add this to your gem file and bundle again.

gem 'xmlrpc'
like image 140
rimkashox Avatar answered Oct 20 '22 05:10

rimkashox