Skip to content

in `require': cannot load such file -- webrick (LoadError) #8

@rgglez

Description

@rgglez

When using ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu] in Ubuntu 22.04 this error is thrown:

$ ruby bin/emulator -r store -p 8080
internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require': cannot load such file -- webrick (LoadError) from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from /gnt/oss/oss-emulator/lib/emulator/server.rb:2:in <top (required)>' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from /gnt/oss/oss-emulator/lib/emulator/cmdline.rb:2:in <top (required)>'
from internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in require' from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in require'
from bin/emulator:6:in `

'

This is caused because ruby 3.x does not include webrick anymore.

The solution is to install it as a dependency:

sudo gem install thor builder webrick

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions