Skip to content

Instantly share code, notes, and snippets.

@mattantonelli
Last active January 5, 2024 01:24
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattantonelli/93964794557dd626416537ef37a26bca to your computer and use it in GitHub Desktop.
Save mattantonelli/93964794557dd626416537ef37a26bca to your computer and use it in GitHub Desktop.
LoadError: cannot load such file -- fiddle #tiny_tds

Attempting to deploy an application with Capistrano after installing the tiny_tds gem may fail at the task rake assets:precompile with the error LoadError: cannot load such file -- fiddle.

Fiddle is an unlisted dependency for the TinyTDS gem. Its usage can be seen here. This should not be confused with the Fiddle gem, an abandoned Rails engine. The Fiddle being referenced here is actually a standard library which serves as a wrapper for the libffi C library.

This library is installed automatically installed with Ruby, but only if you have the libffi-devel package installed on your machine. If you installed Ruby without this package, you will need to re-install Ruby in order for this library to be installed.

To resolve this issue:

  1. Install the libffi package
  • yum install libffi-devel
  1. Reinstall your ruby
  • rbenv install X.X.X

Note: If the ruby used for Capistrano deployment and the ruby used for running Phusion Passenger are different, you will need to reinstall both rubies.

Reference: rails/spring#65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment