-
Notifications
You must be signed in to change notification settings - Fork 329
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
Make FFI work on heroku cedar-14 #594
Conversation
nice. i just ran into this issue myself |
Actually the other place where libraries live on Heroku is |
This makes FFI work with heroku buildpacks
@trostli sure, done |
Thanks! |
That needs to be created specific to the platform currently being used rather than being hard coded to x86. |
Shouldn't a server environment use values provided by ENV? This would allow any server or system to provide proper configurations which is easy enough to document. # # Example
# ENV['FFI_LIBS'] = "/app/vendor/;/lib/x86_64-linux-gnu/"
path = ['/usr/lib/','/usr/local/lib/']
path += ENV['FFI_LIBS'].to_s.split(/[;,]/)
# # Path is now
# ['/usr/lib/', '/usr/local/lib/', '/app/vendor/', '/lib/x86_64-linux-gnu/']
path.find do |pth|
File.exist?(pth + libname)
end |
good suggestion @danielpclark |
is this getting merged? |
merge upstream fixes
Revert "merge upstream fixes"
Please rebase this if it's still an issue. |
When will this be finished? |
This will not be merged. We'll not add architecture specific paths that are wrong on all other architectures. FFI is not responsible for fixing misconfigurations in the library setup. FFI respects the library paths that are provided by the operating system. This is To the contrary we'll remove the static paths entirely in a future release or limit then to operating systems that really need them. |
This small change adds a search path to the library lookup logic. It specifically adds the "/lib/x86_64-linux-gnu/" path which is where libraries live on heroku cedar-14.
This change keeps backwards compatibility with the existing search paths that were already present :)