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:
- Install the libffi package
yum install libffi-devel
- 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