Skip to content

Teaspoon fails to load webrick on Rails 6 #603

Description

@jeremywadsack

Rails 6 no longer ships with webrick. When trying to run teaspoon it fails with the followiing error:

✗ teaspoon
<internal:~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- webrick (LoadError)
	from <internal:~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/zeitwerk-2.6.16/lib/zeitwerk/kernel.rb:34:in `require'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:332:in `block in require'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:299:in `load_dependency'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:332:in `require'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/teaspoon-1.4.0/lib/teaspoon/server.rb:3:in `<top (required)>'
	from <internal:~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from <internal:~/.rvm/rubies/ruby-3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/zeitwerk-2.6.16/lib/zeitwerk/kernel.rb:34:in `require'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:332:in `block in require'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:299:in `load_dependency'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/activesupport-6.1.7.8/lib/active_support/dependencies.rb:332:in `require'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/teaspoon-1.4.0/lib/teaspoon/environment.rb:10:in `load'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/teaspoon-1.4.0/lib/teaspoon/console.rb:10:in `initialize'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/teaspoon-1.4.0/lib/teaspoon/command_line.rb:15:in `new'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/teaspoon-1.4.0/lib/teaspoon/command_line.rb:15:in `initialize'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/teaspoon-1.4.0/bin/teaspoon:6:in `new'
	from ~/.rvm/gems/ruby-3.2.2@project/gems/teaspoon-1.4.0/bin/teaspoon:6:in `<top (required)>'
	from ~/.rvm/gems/ruby-3.2.2@project/bin/teaspoon:25:in `load'
	from ~/.rvm/gems/ruby-3.2.2@project/bin/teaspoon:25:in `<main>'
	from ~/.rvm/gems/ruby-3.2.2@project/bin/ruby_executable_hooks:22:in `eval'
	from ~/.rvm/gems/ruby-3.2.2@project/bin/ruby_executable_hooks:22:in `<main>'

This is caused directly by the explicit require "webrick" in lib/teaspoon/server.rb:

require "webrick"

I was able to work around this by adding require "webrick" back to my Gemfile.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions