ruby-tree-sitter.old icon indicating copy to clipboard operation
ruby-tree-sitter.old copied to clipboard

`initialize': dlsym(0x1144e7300, tree_sitter_ruby): symbol not found (TreeSitter::DocumentError)

Open geoffw8 opened this issue 3 years ago • 0 comments

Hey all - can't seem to get the gem working for some reason.

‘’’ irb(main):002:0> document = TreeSitter::Document.new('a + b * 5', language: 'tree_sitter_ruby') Traceback (most recent call last): (irb):2:in `initialize': dlsym(0x1144e7300, tree_sitter_ruby): symbol not found (TreeSitter::DocumentError) Works perfectly from the command line, though i.e. tree-sitter parse app/controllers/some_controller.rb ‘’’

I had a dig into the gem code but its C, so a little bit over my head.

I seem to have been able to have had the gem install with native extensions on both the brew install location and using ‘TREE_SITTER_PARSER_DIR=[rails_app]/src/tree_sitter bundle install’ - but neither time I could get past that error.

I should add that my language in grammar.js is ruby and it doesn't work with that as the language: option either.

Thanks in advance for any help!

geoffw8 avatar Apr 24 '22 19:04 geoffw8