-
Notifications
You must be signed in to change notification settings - Fork 2
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
Failed to load WithCLexer, using pure Ruby lexer #1
Comments
I can't reproduce this issue locally. By having this code in the source 'https://rubygems.org'
ruby '2.6.4'
gem 'parser', '= 2.6.4.1'
gem 'c_lexer', '= 2.6.4.1.0' I get 0 errors:
because
|
Yes, the difference is that I don't use rvm. I also tested using rvm and the .so file ended up in a lib/ directory. The issue is broader, I encountered it first when trying to install sassc-ruby. There's an issue in their tracker: sass/sassc-ruby#146 (some posts refer to a different issue) but I can say it at least spreads across 4 distributions: CentOS, openSUSE, Fedora, maybe Ubuntu as well. For the record, sassc-ruby 2.1.0 works, because the installed gem is a binary distribution and 2.2.0 isn't. By the way, I also see different gems with .so files in ext/ directory working on my machine, like eventmachine. They use a In short, I think that even if it's a bug in those distributions, it could be a good idea to try to load the .so file from both directories (here it's in ext/lexer/ actually, not just in ext/ like in eventmachine) to avoid the users a bug that's quite hard to debug. |
well, then we should fix it by adding |
That won't do it. There's require_relative being used and it's not
I can do a pull request. |
Fixes sass#146. See also opal/c_lexer#1 for some discussion on the issue.
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:
I tried to inspect the issue further. I tried doing "require 'c_lexer'" manually, but
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:
To:
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.
The text was updated successfully, but these errors were encountered: