Rails: 7.0.0
Ruby: 3.0.2
I am trying to follow DHH’s video on the Rails home page. After uploading the file in the rich text editor, when I hit save and go to the index page, it crashes with the following error:
Could not open library 'vips.42': dlopen(vips.42, 5): image not found. (LoadError)
So far, I have followed the steps exactly, as mentioned in the video. What am I missing?
Thanks,
Akshay
Detailed error stack
Started GET "/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--1f657d3ade676e313a4fe7479aed08bfeb6792f2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCem9MWm05eWJXRjBTU0lJY0c1bkJqb0dSVlE2RkhKbGMybDZaVjkwYjE5c2FXMXBkRnNIYVFJQUJHa0NBQU09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--d13e181aa4190ab54cad5f2ea09ea49161b404f4/desk.png" for 127.0.0.1 at 2021-12-18 12:25:50 -0800
Processing by ActiveStorage::Representations::RedirectController#show as PNG
Parameters: {"signed_blob_id"=>"eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--1f657d3ade676e313a4fe7479aed08bfeb6792f2", "variation_key"=>"[FILTERED]", "filename"=>"desk"}
ActiveStorage::Blob Load (0.3ms) SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
ActiveStorage::VariantRecord Load (0.3ms) SELECT "active_storage_variant_records".* FROM "active_storage_variant_records" WHERE "active_storage_variant_records"."blob_id" = ? AND "active_storage_variant_records"."variation_digest" = ? LIMIT ? [["blob_id", 1], ["variation_digest", "wjqVtOuFppDd1oEBBMUc2TyD8vk="], ["LIMIT", 1]]
Disk Storage (31.1ms) Downloaded file from key: 1iqxwz1xxeueszanceeh767v0qls
Completed 500 Internal Server Error in 217ms (ActiveRecord: 1.3ms | Allocations: 26344)
#<Thread:0x00007fd233ff9760 /Users/akshay/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/actionpack-7.0.0/lib/action_controller/metal/live.rb:340 run> terminated with exception (report_on_exception is true):
/Users/akshay/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi/library.rb:145:in `block in ffi_lib': Could not open library 'vips.42': dlopen(vips.42, 5): image not found. (LoadError)
Could not open library 'libvips.42.dylib': dlopen(libvips.42.dylib, 5): image not found
from /Users/akshay/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi/library.rb:99:in `map'
from /Users/akshay/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/ffi-1.15.4/lib/ffi/library.rb:99:in `ffi_lib'
from /Users/akshay/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:573:in `<module:Vips>'
from /Users/akshay/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/ruby-vips-2.1.4/lib/vips.rb:570:in `<main>'
from /Users/akshay/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'