-
Notifications
You must be signed in to change notification settings - Fork 95
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
Error loading nokogiri when starting compiled binary #151
Comments
@tonchev-ivan did you remove |
@omohokcoj I have removed bootsnap but I'm still getting an error on macOS.
|
@kritik it looks like you need to remove the following lines from the complile.rb file: You can try my working ruby-packer fork https://github.com/motor-admin/ruby-packer - https://github.com/motor-admin/motor-admin has been packed into a single binary with it without any issues. |
@omohokcoj Thanks. That works much better. But why did you change binaries? |
@kritik I assume you're referring to the linked extensions replaced in the ruby-packer fork? |
I see |
@omohokcoj my nokogiri problem has been resolved but I see another C-extension issue. Any idea how to resolve this one?
|
@kritik ruby packer packs compiled dynamic libs (.so for linux and .bundle for macos) into a squashfs - but the problem is that To fix that I had to override the Kernel#require method to check if it's loading .so/bundle file and copy it to the /tmp folder if so. You can check the code here: This monkey patch also solves the issue with slow app boot - #160 |
@omohokcoj Thanks a lot. It helped but seems I far away from getting this done. |
Seems it's not gonna work for me. :( I'm getting now: |
@kritik https://github.com/motor-admin/motor-admin/blob/master/config/boot.rb#L29 - i had to warn you that the You can try to remove the monkey patch for .rb files and use it only for .so and .bundle files: This might help but will make the app boot time very slow - up to 30 seconds. |
Thanks for your help. I have marked that you also cache rb files. :) Unfortunately removing rb file from caching didn't help me. |
@omohokcoj Could we have permission to use the monkey patches in that file under MIT license? |
@ericbeland sure, feel free to reuse those monkey patches |
I am having troubles packing new rails application (generated just with
rails new
) which has dependency tonokogiri
. I have tried configuring bundler options incompiler.rb
with no success, tried any combinations of those:Log message:
Note: If I dont use change bundler config I get the same error for
sqlite3
gem.Env info:
rubyc - latest
master
os - 20.04.1-Ubuntu
ruby - 2.7.1 (rbenv)
rails - 6.0.3.4
The text was updated successfully, but these errors were encountered: