Open ernstki opened 11 months ago
This should be fixed in 2.1.33. Please test and confirm.
This should be fixed in 2.1.33. Please test and confirm.
I'll give it a go. I think there's an intermediate dependency (maybe redcarpet) that can't be resolved, which is why a fresh gem install --user mdless
gave me 2.1.28, and I'd still like to document a workaround for that, if there is one.
For the benefit of my still-stuck-on-Ubuntu-20.04 compatriots. :)
Unfortunately this error seems to persist even with the latest version.
$ mdless --help
Traceback (most recent call last):
7: from /usr/local/bin/mdless:23:in `<main>'
6: from /usr/local/bin/mdless:23:in `load'
5: from /root/.local/share/gem/ruby/2.7.0/gems/mdless-2.1.33/bin/mdless:4:in `<top (required)>'
4: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
3: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
2: from /root/.local/share/gem/ruby/2.7.0/gems/mdless-2.1.33/lib/mdless.rb:21:in `<top (required)>'
1: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require': /root/.local/share/gem/ruby/2.7.0/gems/mdless-2.1.33/lib/mdless/console.rb:756: syntax error, unexpected =>, expecting '}' (SyntaxError)
...map { |k, v| "#{k.downcase}" => v }
... ^~
/root/.local/share/gem/ruby/2.7.0/gems/mdless-2.1.33/lib/mdless/console.rb:757: syntax error, unexpected =>
...escue Psych::DisallowedClass => e
... ^~
$ ruby --version
ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu]
$ gem list | grep mdless
mdless (2.1.33)
Weirdly my fix didn't stick, the code reverted to the previous, problematic statement. Just pushed a new version, hopefully this one works (2.1.35)
-Brett
On 19 Dec 2023, at 23:05, finite8 wrote:
Unfortunately this error seems to persist even with the latest version.
$ mdless --help Traceback (most recent call last): 7: from /usr/local/bin/mdless:23:in `<main>' 6: from /usr/local/bin/mdless:23:in `load' 5: from /root/.local/share/gem/ruby/2.7.0/gems/mdless-2.1.33/bin/mdless:4:in `<top (required)>' 4: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require' 3: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require' 2: from /root/.local/share/gem/ruby/2.7.0/gems/mdless-2.1.33/lib/mdless.rb:21:in `<top (required)>' 1: from /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require' /usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require': /root/.local/share/gem/ruby/2.7.0/gems/mdless-2.1.33/lib/mdless/console.rb:756: syntax error, unexpected =>, expecting '}' (SyntaxError) ...map { |k, v| "#{k.downcase}" => v } ... ^~ /root/.local/share/gem/ruby/2.7.0/gems/mdless-2.1.33/lib/mdless/console.rb:757: syntax error, unexpected => ...escue Psych::DisallowedClass => e ... ^~ $ ruby --version ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [x86_64-linux-gnu] $ gem list | grep mdless mdless (2.1.33)
-- Reply to this email directly or view it on GitHub: https://github.com/ttscoff/mdless/issues/97#issuecomment-1863858857 You are receiving this because you commented.
Message ID: @.***>
Attempting to
gem install --user mdless
with the defaultruby
from the Ubuntu 20.04 repositories results in the following backtrace, due to syntax errors instring.rb
.I suspect this is because the world has left Ruby 2.7.x behind, so I'll try with a newer Ruby and report back.
I also noticed that the version of
string.rb
inmaster
has some changes in that area, so I'll try the version from Git, too. But my guess is Ruby syntax changed, and that's actually the root cause.