How enable LD_LIBRARY_PATH in Capistrano

I used to deploy my Rails app using Capistrano. A new server has been
rebuild (Solaris) but now the sys admin does not want to set up
PermitUserEnvironment true and bundle fails. How can I set
LD_LIBRARY_PATH in Capistrano?

Setting the LD_LIBRARY_PATH on any *nix based system is a major security concern. I don’t blame your sys admin for not wanting to set it. Please paste the error you are getting and the steps you did to get this error that is leading you to believe the LD_LIBRARY_PATH should be set.


This is the error:

  * executing "bundle install --gemfile /sites/rails-data/qna/releases/
20110404075216/Gemfile --path /sites/rails-data/qna/shared/bundle --
deployment --quiet --without development test"
    servers: [""]
    [] executing command
*** [err ::] /usr/ruby-enterprise/lib/
ruby/1.8/sparc-solaris2.10/ ruby: fatal: open failed: No such file or directory - /usr/ruby-
enterprise/lib/ruby/1.8/sparc-solaris2.10/ (LoadError)

If I run bundle with the library path on the server I do not get any
error. The sys admin told me the LD_LIBRARY_PATH set the path to the
encryption library. I run bundler using:

require 'bundler/capistrano'

in deploy.rb

The answer is:

default_environment["LD_LIBRARY_PATH"] = "your_path:$LD_LIBRARY_PATH"

end it solved my issue