Hello I'd just like to share this with you guys, maybe it will come in handy for somebody someday.
I have a rake task for importing data from an external source. The data includes geographic information that need to be converted using the proj command-line utility (http://trac.osgeo.org/proj/). I opened a support ticket to have Heroku install this, which is a standard package in most Linux distros. For some unspecified reason they were not able to do this, but instead asked me to try and include a pre-compiled binary for the AMD64 platform in a bin/ directory of my app. So I randomly selected the latest Ubuntu distro, and got the libproj0_4.7.0-1_amd64.deb and proj-bin_4.7.0-1_amd64.deb from there. These can be unpacked with tar xzvf <file>, and somewhere inside the executables and the libraries can be found. I copied the 'proj' executable and the 'libproj.so.0' library to a new bin/ directory of my app, checked them into git, and pushed to Heroku. After a bit of experimenting in the console, this is how I got the program to run: `LD_LIBRARY_PATH=$LD_LIBRARY_PATH:#{ENV['APP_ROOT']}/bin #{ENV['APP_ROOT']}/bin/proj 2>&1` This includes the bin/ dir in the LD_LIBRARY_PATH environment variable, so that the proj executable is able to find the libproj.so.0 library file. The '2>&1' part just combines STDOUT and STDERR, so that I'm able to see the output. parvati:some-app martin$ heroku console Ruby console for some-app.heroku.com >> `LD_LIBRARY_PATH=$LD_LIBRARY_PATH:#{ENV['APP_ROOT']}/bin >> #{ENV['APP_ROOT']}/bin/proj 2>&1` => "Rel. 4.7.1, 23 September 2009\nusage: proj [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]\n" >> I love it when stuff works. Happy hacking! -martin -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to her...@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.