middleman / middleman

Hand-crafted frontend development

Home Page:https://middlemanapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require': cannot load such file -- opal (LoadError)

dnajd opened this issue · comments

commented

Expected behavior and actual behavior

Expect you could install middleman, add files to the lib folder & middleman would still work

Steps to reproduce the problem (from a clean middleman installation)

install middleman and add any file to lib/ folder (ex. test.rb) and you'll the the error below

Additional information

  • Ruby version: 3.3.0
  • Middleman version: 4.5.1
  • OS version: debian 12.5

Error

web-1  | Please report a bug if this causes problems.
web-1  | /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require': cannot load such file -- opal (LoadError)
web-1  |        from /usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `block (2 levels) in replace_require'
web-1  |        from /usr/local/bundle/gems/tilt-2.0.11/lib/tilt/mapping.rb:243:in `block in lazy_load'
web-1  |        from /usr/local/bundle/gems/tilt-2.0.11/lib/tilt/mapping.rb:241:in `each'
web-1  |        from /usr/local/bundle/gems/tilt-2.0.11/lib/tilt/mapping.rb:241:in `lazy_load'
web-1  |        from /usr/local/bundle/gems/tilt-2.0.11/lib/tilt/mapping.rb:216:in `lookup'
web-1  |        from /usr/local/bundle/gems/tilt-2.0.11/lib/tilt/mapping.rb:154:in `[]'
web-1  |        from /usr/local/bundle/gems/tilt-2.0.11/lib/tilt.rb:48:in `[]'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/sources/source_watcher.rb:338:in `strip_extensions'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_reference.rb:43:in `send_to'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/call_with.rb:87:in `call_with_inner'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:133:in `block (2 levels) in redefine_method'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `each'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `block in redefine_method'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/sources/source_watcher.rb:326:in `record_file_change'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_reference.rb:43:in `send_to'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/call_with.rb:87:in `call_with_inner'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:133:in `block (2 levels) in redefine_method'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `each'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `block in redefine_method'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/sources/source_watcher.rb:265:in `block in update'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/sources/source_watcher.rb:264:in `each'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/sources/source_watcher.rb:264:in `update'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_reference.rb:43:in `send_to'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/call_with.rb:87:in `call_with_inner'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:133:in `block (2 levels) in redefine_method'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `each'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `block in redefine_method'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/sources/source_watcher.rb:212:in `poll_once!'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_reference.rb:43:in `send_to'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/call_with.rb:87:in `call_with_inner'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:133:in `block (2 levels) in redefine_method'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `each'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `block in redefine_method'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/sources.rb:241:in `block in poll_once!'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/sources.rb:241:in `each'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/sources.rb:241:in `reduce'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/sources.rb:241:in `poll_once!'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_reference.rb:43:in `send_to'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/call_with.rb:87:in `call_with_inner'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:133:in `block (2 levels) in redefine_method'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `each'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `block in redefine_method'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/core_extensions/file_watcher.rb:47:in `before_configuration'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_reference.rb:43:in `send_to'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/call_with.rb:87:in `call_with_inner'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:133:in `block (2 levels) in redefine_method'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `each'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `block in redefine_method'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/callback_manager.rb:57:in `instance_exec'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/callback_manager.rb:57:in `block in execute'
web-1  |        from /usr/local/bundle/gems/hamster-3.0.0/lib/hamster/vector.rb:1316:in `each'
web-1  |        from /usr/local/bundle/gems/hamster-3.0.0/lib/hamster/vector.rb:1316:in `traverse_depth_first'
web-1  |        from /usr/local/bundle/gems/hamster-3.0.0/lib/hamster/vector.rb:431:in `each'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/callback_manager.rb:57:in `execute'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_reference.rb:43:in `send_to'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/call_with.rb:87:in `call_with_inner'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:133:in `block (2 levels) in redefine_method'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `each'
web-1  |        from /usr/local/bundle/gems/contracts-0.16.1/lib/contracts/method_handler.rb:132:in `block in redefine_method'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/callback_manager.rb:28:in `block in install_methods!'
web-1  |        from /usr/local/bundle/gems/middleman-core-4.5.1/lib/middleman-core/application.rb:283:in `initialize'
web-1  |        from /usr/local/bundle/gems/middleman-cli-4.5.1/bin/middleman:49:in `new'
web-1  |        from /usr/local/bundle/gems/middleman-cli-4.5.1/bin/middleman:49:in `<top (required)>'
web-1  |        from /usr/local/bundle/bin/middleman:25:in `load'
web-1  |        from /usr/local/bundle/bin/middleman:25:in `<main>'
commented

This issue looked related... #2015

adding the gem

gem 'opal'

results in

(eval at /usr/local/bundle/gems/tilt-2.0.11/lib/tilt/mapping.rb:246):1:in `block in lazy_load': uninitialized constant Opal::Processor (NameError)

at which point I found this issue: #2139

gem 'opal', '~> 0.10.5'

which results in

/usr/local/lib/ruby/3.3.0/bundled_gems.rb:74:in `require': cannot load such file -- racc/parser.rb (LoadError)

and searching around I found suggestions that I should

gem 'racc'

which brings us back to

/usr/local/bundle/gems/opal-0.11.4/lib/opal/paths.rb:8:in `core_dir': undefined method `untaint' for an instance of String (NoMethodError)

And I'm in way over my head. How does anyone use middleman these days? Am I on the wrong ruby or something?