Skip to content

Failed to load WithCLexer, using pure Ruby lexer #1

@hmdne

Description

@hmdne

I have Opal installed with distribution provided gem and bundler commands (without rvm). I wasn't able to enable c_lexer, because an error happened all the time:

Failed to load WithCLexer, using pure Ruby lexer

I tried to inspect the issue further. I tried doing "require 'c_lexer'" manually, but

LoadError: cannot load such file -- /usr/share/gems/gems/c_lexer-2.6.4.1.0/lib/lexer

Hmm I guess you meant lexer.so, but it's not in lib, it's in ext/lexer actually. I replaced this line in lib/c_lexer.rb from:

require_relative 'lexer'

To:

require_relative '../ext/lexer/lexer'

And it finally worked. Would you consider changing it upstream or somehow work towards improving the build tools? Or should I consider upgrading some tool? I use distribution provided ruby-2.6.3 and bundler-1.17.2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions