Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teaspoon fails to load webrick on Rails 6 #603

Open
jeremywadsack opened this issue Jul 26, 2024 · 0 comments
Open

Teaspoon fails to load webrick on Rails 6 #603

jeremywadsack opened this issue Jul 26, 2024 · 0 comments

Comments

@jeremywadsack
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant