blackwinter / rb-gsl

Ruby interface to the GNU Scientific Library [Ruby 2.x and GSL 1.16 compatible fork of the gsl gem]
https://blackwinter.github.io/rb-gsl
Other
27 stars 7 forks source link

Gem impossible to deploy to heroku #18

Closed adrienbourgeois closed 9 years ago

adrienbourgeois commented 9 years ago

It seems that the gem is trying to write in "/var/lib/gems" which makes it impossible to deploy to heroku (because the file system on heroku is read only, except for "tmp" - http://stackoverflow.com/questions/6949751/heroku-read-only-file-system-var-www -)

blackwinter commented 9 years ago

Please excuse my abruptness but I'm in a hurry. rb-gsl doesn't write anywhere, RubyGems does. Maybe you're observing RubyGems lazily compiling the extension (although that shouldn't be a problem anymore since version 2.3.0). I can take a closer look on Monday. In the meanwhile, please provide more information about your environment (Ruby version, RubyGems version, rb-gsl version, etc.).

adrienbourgeois commented 9 years ago

Thank you @blackwinter for your quick answer.

So to give a bit more background, I use the gem Integration (https://github.com/clbustos/integration) and rb-gsl is a dependency.

The ruby version used is 2.2.0

When I just run

heroku run gem install rb-gsl -v '1.16.0.4'

here is the output

Running `gem install rb-gsl -v 1.16.0.4` attached to terminal... up, run.7409
Fetching: narray-0.6.1.1.gem (100%)
ERROR:  While executing gem ... (Errno::EROFS)
    Read-only file system - /var/lib/gems

Unfortunately it seems that is a known issue that has no solution: https://discussion.heroku.com/t/how-to-install-the-gnu-scientific-library-gsl-library-on-heroku/723

I don't really understand what really is the problem, if you shed some light on this that'd be awesome :)

gregory commented 9 years ago

hey guys, just saying but i just built 2 buildpack for 1.16 and 1.15 and the corresponding ruby versions here: https://github.com/gregory/heroku-gsl-buildpack

heroku buildpacks:set git://github.com/gregory/heroku-buildpack-ruby#gsl-1.16-ruby

should fix your problem

adrienbourgeois commented 9 years ago

That's awesome @gregory . I'll give it a try asap! If it solves my problem I'll give you a star :)

blackwinter commented 9 years ago

Adrien, did the buildpack work for you? I don't have any experience with Heroku and since this is not an rb-gsl issue, I'm inclined to close it.

adrienbourgeois commented 9 years ago

Sorry @blackwinter I still haven't tried it. I will keep you updated if you don't close the issue. Cheers

blackwinter commented 9 years ago

Ok, take your time. I just noticed that you already gave Grégory his star ;) I'm certainly interested in any solution you may find.

adrienbourgeois commented 9 years ago

Yes that's true haha I had a quick look at the code though and it looks alright. I will let you know as soon as I have tried. Cheers mate

gregory commented 9 years ago

i guess @adrienbourgeois just got too excited :) I tested it and worked :D Feel free to open issue on the repo if you find anything!