title: Why is there a "no such file or directory" error when the .so file does exist?
body: <p>I'm trying to connect from Ruby 1.8.7 on RHEL 5 to MS SQL Server. I'm using <a href="http://freetds.org/" rel="nofollow">FreeTDS</a> and the <a href="http://github.com/rails-sqlserver/tiny_tds" rel="nofollow">tiny_tds</a> RubyGem.</p>
  
  <p>I got it working fine on OS X.</p>
  
  <p>On Linux I installed FreeTDS and confirmed that it can connect to SQL Server from the command line no problem. And <code>gem install tiny_tds</code> went fine.</p>
  
  <p>However, when I deploy to Linux and try to open the Rails console I get this error:</p>
  
  <pre><code>$ script/console production
  Loading production environment (Rails 2.3.5)
  libsybdb.so.5: cannot open shared object file: No such file or directory - /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/tiny_tds-0.2.1/lib/tiny_tds/tiny_tds.so
  /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/tiny_tds-0.2.1/lib/tiny_tds/tiny_tds.so
  /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
  /opt/deployed_rails_apps/employeedata/releases/20101025214030/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in `require'
  /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/tiny_tds-0.2.1/lib/tiny_tds.rb:7
  /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
  /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
  
  etc...
  </code></pre>
  
  <p>I checked that this file that it says it can't find actually does exist on the filesystem...</p>
  
  <pre><code>/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems \
      /tiny_tds-0.2.1/lib/tiny_tds/tiny_tds.so
  </code></pre>
  
  <p>Any ideas how to get this to work?</p>