faster_path: Gem v0.1.0 Does Not Load
Getting a weird error loading faster_path in an existing Rails application. Here’s the back trace:
(trunk*) rails console
/Users/patrick/.rvm/gems/ruby-2.2.3/gems/ffi-1.9.10/lib/ffi/library.rb:133:in `block in ffi_lib': Could not open library '/Users/patrick/.rvm/gems/ruby-2.2.3/gems/faster_path-0.1.0/target/release/libfaster_path.dylib': dlopen(/Users/patrick/.rvm/gems/ruby-2.2.3/gems/faster_path-0.1.0/target/release/libfaster_path.dylib, 5): image not found (LoadError)
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/ffi-1.9.10/lib/ffi/library.rb:100:in `map'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/ffi-1.9.10/lib/ffi/library.rb:100:in `ffi_lib'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/faster_path-0.1.0/lib/faster_path.rb:36:in `<module:Rust>'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/faster_path-0.1.0/lib/faster_path.rb:34:in `<module:FasterPath>'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/faster_path-0.1.0/lib/faster_path.rb:5:in `<top (required)>'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
from /Users/patrick/rails/test_app/config/application.rb:10:in `<top (required)>'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/spring-1.1.2/lib/spring/application.rb:82:in `require'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/spring-1.1.2/lib/spring/application.rb:82:in `preload'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/spring-1.1.2/lib/spring/application.rb:140:in `serve'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/spring-1.1.2/lib/spring/application.rb:128:in `block in run'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/spring-1.1.2/lib/spring/application.rb:122:in `loop'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/spring-1.1.2/lib/spring/application.rb:122:in `run'
from /Users/patrick/.rvm/gems/ruby-2.2.3/gems/spring-1.1.2/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/patrick/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/patrick/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
I suspect it’s an issue with the ffi version but I’m assuming the gemspec should address that rather than me mucking around with that in the application’s Gemfile.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 28 (19 by maintainers)
Commits related to this issue
- May influence #18, #20, and #68 — committed to danielpclark/faster_path by danielpclark 8 years ago
- Merge pull request #92 from danielpclark/dep_update May influence #18, #20, and #68 — committed to danielpclark/faster_path by danielpclark 8 years ago
Okay! I’ve published this as gem 0.1.5 . I’d like a confirmation or two on this working with a Mac in a bundle install and I’ll close this issue. Thanks for your feedback!
0.1.2. and running cargo build --release fixed it for me
That got the app to boot. Here’s what it looks like after running
cargo build --release