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
"uninitialized constant Haml::Options" error while launching Middleman server on a fresh install #2569
Comments
6.0 introduces breaking changes (see middleman#2569)
6.0 introduces breaking changes (see middleman#2569)
As a temporary workaround you can fix this in any project using a Gemfile by limiting the version of haml in your Gemfile, for example:
|
Thanks, that temporary solution fixed the problem for now. Any ETA for a permanent fix? |
6.0 introduces breaking changes (see #2569)
I'm seeing the same problem. I can lock the After the |
Same problem for me. Brand new project with /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/renderers/haml.rb:49:in `initialize': uninitialized constant Haml::Options (NameError)
::Haml::Options.defaults[:context] = nil
^^^^^^^^^
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/extension_manager.rb:66:in `new'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/extension_manager.rb:66:in `activate'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/extensions.rb:120:in `block in auto_activate'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/3.1.0/set.rb:511:in `each_key'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/3.1.0/set.rb:511:in `each'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/extensions.rb:117:in `auto_activate'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/extension_manager.rb:28:in `auto_activate'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/extension_manager.rb:20:in `block (2 levels) in initialize'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/callback_manager.rb:57:in `instance_exec'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/callback_manager.rb:57:in `block in execute'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/hamster-3.0.0/lib/hamster/vector.rb:1316:in `each'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/hamster-3.0.0/lib/hamster/vector.rb:1316:in `traverse_depth_first'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/hamster-3.0.0/lib/hamster/vector.rb:431:in `each'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/callback_manager.rb:57:in `execute'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/callback_manager.rb:28:in `block in install_methods!'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-core-4.4.2/lib/middleman-core/application.rb:280:in `initialize'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-cli-4.4.2/bin/middleman:49:in `new'
from /Users/levinotik/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/middleman-cli-4.4.2/bin/middleman:49:in `<top (required)>'
from /Users/levinotik/.rbenv/versions/3.1.2/bin/middleman:25:in `load'
from /Users/levinotik/.rbenv/versions/3.1.2/bin/middleman:25:in `<main>' |
Same as above - |
This reverts commit 21d1e10. Because of incompatibility with middleman. middleman/middleman#2569
I ran into this issue today (2022-10-12) on a fresh middleman install. I started with Ruby version 3.1.2 and Then I dropped down to Ruby version 3.0.3 and The workaround provided here solved the issue for me, but recent commits don't seem to have solved the issue, at least not for me. |
Same issue.
|
I'm still having the same issue even with the fix mentioned above running into this error when I run
|
Hello everyone 👋🏼 The fix was already merged (in both branches, 4.x and 5.x), but still not released, see: In the meantime, you can point the gem to GitHub gem 'middleman', github: 'middleman', branch: '4.x' Or if you are already using on gem 'middleman', github: 'middleman', branch: 'master' |
see also: #2588 |
Published as v4.4.3 https://rubygems.org/gems/middleman/versions/4.4.3 |
Could we possibly release master as 5.0.0.rc2 as a first Haml 6-compatible version? |
Sounds good! |
I also prepared a backport to the current |
I tried creating a fresh new Middleman project and launching the server.
Command
middleman server
fails to launch giving the following error message:I'm also getting the same error message this way.
Additional information
The text was updated successfully, but these errors were encountered: