Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku LoadError: libruby.so.2.2

When I tried to push my changes to a staging dyno on Heroku I got this message when it's building:

$ git push staging
.
.
.
remote: -----> Installing dependencies using 1.9.7
remote:        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Ignoring bcrypt-3.1.10 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.10
remote:        Ignoring json-1.8.3 because its extensions are not built.  Try: gem pristine json --version 1.8.3
remote:        Ignoring nokogiri-1.6.6.2 because its extensions are not built.  Try: gem pristine nokogiri --version 1.6.6.2
remote:        Ignoring pg-0.18.2 because its extensions are not built.  Try: gem pristine pg --version 0.18.2
remote:        Ignoring puma-2.11.3 because its extensions are not built.  Try: gem pristine puma --version 2.11.3
.
.
.
remote:        Could not detect rake tasks
remote:        ensure you can run `$ bundle exec rake -P` against your app with no environment variables present
remote:        and using the production group of your Gemfile.
remote:        Ignoring bcrypt-3.1.10 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.10
remote:        rake aborted!
remote:        LoadError: libruby.so.2.2: cannot open shared object file: No such file or directory - /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/bundle/ruby/2.2.0/gems/pg-0.18.2/lib/pg_ext.so
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/bundle/ruby/2.2.0/gems/pg-0.18.2/lib/pg.rb:4:in `require'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/bundle/ruby/2.2.0/gems/pg-0.18.2/lib/pg.rb:4:in `<top (required)>'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/config/application.rb:7:in `<top (required)>'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/Rakefile:4:in `require'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/Rakefile:4:in `<top (required)>'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/rake_module.rb:28:in `load_rakefile'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:689:in `raw_load_rakefile'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:94:in `block in load_rakefile'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:93:in `load_rakefile'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:77:in `block in run'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/ruby-2.2.2/lib/ruby/2.2.0/rake/application.rb:75:in `run'
remote:        /tmp/build_b71ac242c3d15f1101c544fbb9a9b123/vendor/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
remote:        vendor/bundle/bin/rake:16:in `load'
remote:        vendor/bundle/bin/rake:16:in `<main>'

When I visit the app in the browser it says Application Error. I checked the logs and here's what I found:

2015-07-24T16:34:36.532160+00:00 heroku[slug-compiler]: Slug compilation started
2015-07-24T16:34:36.532180+00:00 heroku[slug-compiler]: Slug compilation finished
2015-07-24T16:34:36.481987+00:00 heroku[api]: Deploy f611e08 by [email protected]
2015-07-24T16:34:36.481987+00:00 heroku[api]: Release v8 created by [email protected]
2015-07-24T16:34:36.732152+00:00 heroku[web.1]: State changed from up to starting
2015-07-24T16:34:39.699147+00:00 heroku[web.1]: Starting process with command `bundle exec puma -C config/puma.rb`
2015-07-24T16:34:40.106519+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-07-24T16:34:40.968709+00:00 app[web.1]: [3] - Gracefully shutting down workers...
2015-07-24T16:34:41.527857+00:00 app[web.1]: Ignoring bcrypt-3.1.10 because its extensions are not built.  Try: gem pristine bcrypt --version 3.1.10
2015-07-24T16:34:41.640162+00:00 app[web.1]: [3] === puma shutdown: 2015-07-24 16:34:41 +0000 ===
2015-07-24T16:34:41.640171+00:00 app[web.1]: [3] - Goodbye!
2015-07-24T16:34:42.025147+00:00 app[web.1]: [3] Puma starting in cluster mode...
2015-07-24T16:34:42.025157+00:00 app[web.1]: [3] * Version 2.12.2 (ruby 2.2.2-p95), codename: Plutonian Photo Shoot
2015-07-24T16:34:42.025185+00:00 app[web.1]: [3] * Environment: production
2015-07-24T16:34:42.025159+00:00 app[web.1]: [3] * Min threads: 5, max threads: 5
2015-07-24T16:34:42.025191+00:00 app[web.1]: [3] * Preloading application
2015-07-24T16:34:42.025187+00:00 app[web.1]: [3] * Process workers: 2
2015-07-24T16:34:42.583286+00:00 app[web.1]: [3] ! Unable to load application: LoadError: libruby.so.2.2: cannot open shared object file: No such file or directory - /app/vendor/bundle/ruby/2.2.0/gems/pg-0.18.2/lib/pg_ext.so
2015-07-24T16:34:42.583297+00:00 app[web.1]: /app/vendor/bundle/ruby/2.2.0/gems/pg-0.18.2/lib/pg.rb:4:in `require': libruby.so.2.2: cannot open shared object file: No such file or directory - /app/vendor/bundle/ruby/2.2.0/gems/pg-0.18.2/lib/pg_ext.so (LoadError)
2015-07-24T16:34:42.583302+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/pg-0.18.2/lib/pg.rb:4:in `<top (required)>'
2015-07-24T16:34:42.583306+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `require'
2015-07-24T16:34:42.583308+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
2015-07-24T16:34:42.583311+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `each'
2015-07-24T16:34:42.583315+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:72:in `block in require'
2015-07-24T16:34:42.583316+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `each'
2015-07-24T16:34:42.583320+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:61:in `require'
2015-07-24T16:34:42.583324+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/bundler-1.9.7/lib/bundler.rb:134:in `require'
2015-07-24T16:34:42.583328+00:00 app[web.1]:    from /app/config/application.rb:7:in `<top (required)>'
2015-07-24T16:34:42.583330+00:00 app[web.1]:    from /app/config/environment.rb:2:in `require'
2015-07-24T16:34:42.583334+00:00 app[web.1]:    from /app/config/environment.rb:2:in `<top (required)>'
2015-07-24T16:34:42.583339+00:00 app[web.1]:    from config.ru:3:in `require'
2015-07-24T16:34:42.583343+00:00 app[web.1]:    from config.ru:3:in `block in <module:PumaRackCompat>'
2015-07-24T16:34:42.583344+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/puma-2.12.2/lib/puma/rack/builder.rb:189:in `instance_eval'
2015-07-24T16:34:42.583347+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/puma-2.12.2/lib/puma/rack/builder.rb:189:in `initialize'
2015-07-24T16:34:42.583349+00:00 app[web.1]:    from config.ru:in `new'
2015-07-24T16:34:42.583352+00:00 app[web.1]:    from config.ru:in `<module:PumaRackCompat>'
2015-07-24T16:34:42.583356+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/puma-2.12.2/lib/puma/rack/builder.rb:183:in `eval'
2015-07-24T16:34:42.583359+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/puma-2.12.2/lib/puma/rack/builder.rb:183:in `new_from_string'
2015-07-24T16:34:42.583361+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/puma-2.12.2/lib/puma/rack/builder.rb:174:in `parse_file'
2015-07-24T16:34:42.583364+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/puma-2.12.2/lib/puma/configuration.rb:104:in `load_rackup'
2015-07-24T16:34:42.583369+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/puma-2.12.2/lib/puma/runner.rb:113:in `load_and_bind'
2015-07-24T16:34:42.583368+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/puma-2.12.2/lib/puma/configuration.rb:71:in `app'
2015-07-24T16:34:42.583372+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/puma-2.12.2/lib/puma/cluster.rb:304:in `run'
2015-07-24T16:34:42.583376+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/puma-2.12.2/lib/puma/cli.rb:215:in `run'
2015-07-24T16:34:42.583379+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/gems/puma-2.12.2/bin/puma:10:in `<top (required)>'
2015-07-24T16:34:42.583383+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/bin/puma:23:in `load'
2015-07-24T16:34:42.583384+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.2.0/bin/puma:23:in `<main>'

Two weeks ago when I created this staging dyno there was no problem. Today I just added an html erb file, push the changes and it gives me the errors above.

Any help?

like image 981
hsym Avatar asked Dec 25 '22 16:12

hsym


2 Answers

Found the problem... the cache in heroku dyno needs to be purged. Heroku made a plugin that can do just that. Install it:

$ heroku plugins:install heroku-repo

And run:

$ heroku repo:purge_cache -a appname

Then commit something or run heroku repo:reset and deploy again.

like image 94
hsym Avatar answered Dec 28 '22 06:12

hsym


The cache in heroku dyno needs to be purged. Heroku made a plugin that can do just that. Install it:

$ heroku plugins:install heroku-repo

And run:

$ heroku repo:purge_cache -a $APPNAME

Then deploy again.

like image 41
deanmarano Avatar answered Dec 28 '22 07:12

deanmarano