fast_secure_compare
fast_secure_compare copied to clipboard
require 'fast_secure_compare' fails
When require 'fast_secure_compare' is called, it fails with LoadError: no such file to load -- fast_secure_compare. Because fast_secure_compare/rack and fast_secure_compare/rails eventually call this, they end up failing too.
It works if you instead do require 'fast_secure_compare/fast_secure_compare', so I'm guessing there's an issue with the directory in which the module definition lives.
Weird.
I will investigate this as soon as I have a moment --- I have a full time job in a totally different field now, so it may take a little while.
A minimal test case would be super helpful if you get the chance.
@daxtens Thanks for responding. Simply cloning this repository and running rspec will hit this issue.
I'm not very familiar with writing gems with C extensions, but this guide appears to indicate:
lib/<name>.rbcontainsrequire '<name>/<name>'which loads the C extension
A lib/fast_secure_compare.rb file does not appear to exist with this line.
Thanks, that's great. Optimistically I'm hoping to work on it this weekend: it sounds like it should be easy to fix.
I will also add that to the test suite so it doesn't get broken again.
I tried forking your repo to see if I could implement the fix myself, but adding that file did not appear to be sufficient. Again I'm not very familiar with C extensions, so there might be something else I'm missing. Hopefully you'll have more luck. Thanks!
I can confirm, creating a file lib/fast_secure_compare.rb with content
require 'fast_secure_compare/fast_secure_compare'
fixes the problem.
Btw, mysteriously master contains version 1.0.0, while rubygems have 1.0.1. Where did they get it?
Same problem as @RKushnir
I'm sorry I haven't had time to look at this. I probably should just admit defeat at this point: is there anyone who would like to take over the project? @RKushnir?
Rubygem's 1.0.1 was just a version without binary gems, because they were messing things up. It's the same source.
The workaround is require 'fast_secure_compare/fast_secure_compare'
2015-07-01 0:55 GMT-03:00 Daniel Axtens [email protected]:
I'm sorry I haven't had time to look at this. I probably should just admit defeat at this point: is there anyone who would like to take over the project? @RKushnir https://github.com/RKushnir?
Rubygem's 1.0.1 was just a version without binary gems, because they were messing things up. It's the same source.
— Reply to this email directly or view it on GitHub https://github.com/daxtens/fast_secure_compare/issues/2#issuecomment-117427519 .
Is there a fork of this somewhere that actually works out of the box?
@aurcioli-handy Check last commit in my fork https://github.com/RKushnir/fast_secure_compare It worked for me, but I was just guessing at a fix, so not sure if it's completely correct.
Just out of interest, what are you thinking of using this for? Has this shown up in a benchmark? I'm just nervous about making this project any more usable because I don't have time to properly keep track of it.
No worries, I don't need to use this project anymore. I read about it online though and thats how I came about it.