It seems so simple, but I cannot close this last gap. I recently added GSL to my Heroku-based application through the Heroku buildpack for GSL / Ruby . Both the buildpack and the gem-bound GSL seem to be set just fine for the reduced push output below:
$git push staging master
Fetching repository, done.
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 476 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
Running: bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Using builder (3.0.4)
<...snip...>
Installing narray (0.6.0.8)
Installing gsl (1.15.3)
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./vendor/bundle
Bundle completed (76.10s)
Cleaning up the bundler cache.
Running: rake assets:precompile
Running: rake assets:precompile
Compiled jquery.js (2ms) (pid 1884)
<...snip...>
Asset precompilation completed (63.31s)
Heroku log shows a missing file, libgsl.so.0
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.14/lib/active_support/dependencies.rb:251:in `require': libgsl.so.0: cannot open shared object file: No such file or directory - /app/vendor/bundle/ruby/1.9.1/gems/gsl-1.15.3/lib/rb_gsl.so (LoadError)
However, the missing file exists in ~/vendor/gsl-1/lib:
~/vendor/gsl-1/lib $ ls -l
total 23256
-rw------- 1 u58334 58334 13351772 2012-09-18 02:29 libgsl.a
-rw------- 1 u58334 58334 1781834 2012-09-18 02:26 libgslcblas.a
-rwx------ 1 u58334 58334 954 2012-09-18 02:26 libgslcblas.la
lrwxrwxrwx 1 u58334 58334 20 2014-04-03 17:34 libgslcblas.so -> libgslcblas.so.0.0.0
lrwxrwxrwx 1 u58334 58334 20 2014-04-03 17:34 libgslcblas.so.0 -> libgslcblas.so.0.0.0
-rwx------ 1 u58334 58334 1052844 2012-09-18 02:26 libgslcblas.so.0.0.0
-rwx------ 1 u58334 58334 922 2012-09-18 02:29 libgsl.la
lrwxrwxrwx 1 u58334 58334 16 2014-04-03 17:34 libgsl.so -> libgsl.so.0.16.0
lrwxrwxrwx 1 u58334 58334 16 2014-04-03 17:34 libgsl.so.0 -> libgsl.so.0.16.0
-rwx------ 1 u58334 58334 7603609 2012-09-18 02:29 libgsl.so.0.16.0
drwx------ 2 u58334 58334 4096 2012-09-18 02:29 pkgconfig
I tried heroku config:set PATH=/vendor/gsl-1/lib --app vp-staging, but then got an error Error: No such file or directoryfrom Heroku.
Heroku stackoverflow, , Heroku . , ...
, rb_gsl.so :
~/vendor/bundle/ruby/1.9.1/gems/gsl-1.15.3/lib $ ls -l
total 3968
drwx
-rw
drwx
-rw
-rw
-rwx
, , GSL-, GSL, , Heroku ...
EDIT: , ... .
libgsl.so.0 :
$heroku config:add LD_LIBRARY_PATH=/app/vendor/gsl-1
. .
, "" /usr/lib32. , Heroku lib32 ( lib), (, , ) autoload eager_load, eager_load_path application.rb:
config.eager_load_paths += %W(#{config.root}/lib #{config.root}/lib32)
.
.
Heroku , , LD_LIBRARY_PATH=/app/vendor/gsl-1/lib, /lib. , . , - ...