Rails Heroku pg_ext.so - ruby-on-rails

I'm trying to deploy my Rails app with Heroku. The app works fine in a local environment, and git push heroku master works fine, but an application error page is displayed when I try to view the deployed app. I'm getting similar errors from the logs and whenever I try to run a heroku run rake db:migrate command:
/app/vendor/bundle/ruby/2.3.0/gems/pg-0.21.0/lib/pg.rb:4:in `require': libruby.so.2.3: cannot open shared object file: No such file or directory - /app/vendor/bundle/ruby/2.3.0/gems/pg-0.21.0/lib/pg_ext.so (LoadError)
Windows 10 Bash with Ubuntu
Ruby 2.3.4p301
Rails 5.0.3
PostgreSQL 9.3.16
pg Gem 0.21.0
I've checked multiple posts that had the same error, but none of them helped.

Related

"bash: rails: command not found" on heroku even though rails is installed

I created a new heroku app, pushed the code, it was recognized as a rails app, and heroku started running the migrations. This lead to an error, and so I tried to run:
heroku run rails db:reset --remote staging
However, even though rails was obviously installed, I got this error:
bash: rails: command not found
I also tried replacing rails with /app/bin/rails, which didn't work either.

Error Code H10 on Heroku Logs

I have a ruby on rails app hosted locally that works fine, but when I push to heroku and open the app there it won't load. I ran heroku logs and I got
I have already ran $ heroku run rake db:migrate, and have bundle update and bundle install my gem files. I ran heroku restart before the heroku logs.
Like I said, locally it runs fine.
heroku logs screenshot
My contact.rb https://gist.github.com/Connerh92/eb8c26053d5e0329a60b28da071c5eb4

Unable to deploy rails test app to Heroku

I'm working through the odin project's web development course and I'm getting tripped up on the last part of the installations project where you are tasked with deploying a rails app to Heroku. I've been working on this for about a week but I refuse to give up but I realize that I need some help.
Here's the link to the tutorial I'm trying to work through (on a mac):
http://installfest.railsbridge.org/installfest/deploy_a_rails_app
I have a Heroku account set up, and am running Ruby 2.3.0 and rails 4.2.5.1. Rubygems are at 2.6.1 (but I tried them at 2.5.1 too).
Everything works fine but when I get to heroku run rake db:migrate I always get the time out error:
[~/railsbridge/test_app] ruby-2.3.0 $ git push heroku master
Everything up-to-date
[~/railsbridge/test_app] ruby-2.3.0 $ heroku run rake db:migrate
Running rake db:migrate on powerful-journey-35824... up, run.9421
▸ ETIMEDOUT: connect ETIMEDOUT 50.19.103.36:5000
I saw another post suggesting that the problem is a result of the connection I'm using blocking port 5000 (I'm at a library). I checked port 5000 on canyouseeme.org as well but it also timed out.
I then tried deploying the app detached using heroku run:detached rake db:migrate and it seems to work until I open heroku again and it shows that the page I'm looking for doesn't exist.
Basically what I'm asking is, does anyone have any idea why this test app isn't getting pushed from my terminal to the heroku deployment page?
I'm a python/django guy, but taking a guess the "everything up to date" message is likely because you have not commited your changes to git. Try:
git commit -a
git push heroku master
Now run your rake command.

Deploying Ruby on Rails to Heroku

I am trying to upload RoR application to Heroku.
OS - Ubuntu, ruby version - 2.2.2p95, rails version - 4.2.1, database - PostgreSQL, installed RoR via BrightBox (Tutorial from treehouse), using git push heroku master to upload.
On the local server app works fine. When I push it to heroku, it gives out an error:
The page you were looking for doesn't exist.
You may have mistyped the address or the page may have moved.
If you are the application owner check the logs for more information.
Log files say:
/usr/bin/env: ruby2.2: No such file or directory
I've tried all the possible variants, I could find on the Internet:
rake rails:update:bin
Remove bin from ~/.gitignore (But there is no such file)
heroku config:set PATH=bin:vendor/bundle/ruby/2.2.2/bin:/usr/local/bin:/usr/bin:/bin
Adding this to the GemFile: ruby '2.2.2'
Changed #!/usr/bin/env ruby2.2(.2 (not sure about ".2")) to #!/usr/bin/env ruby (in bin/rake, bin/bundle and bin/rails)
heroku run rails db:migrate
rake rails:update:bin
ln -s /usr/bin/nodejs /usr/bin/node
To upload to heroku, I've configured git, after that logged in heroku, after that "heroku create", after that "git push heroku master", then "heroku open"
And many others... Any ideas how to solve that problem?
Do you have the gem rails12_factor installed and config.assets.compile = true ?
Not sure you mistyped or something else. but heroku run rails db:migrate will not work it should be heroku run rake db:migrate . It might be because you don't have root page. Precompile issue etc.
Run heroku logs -a app_name to see actual logs.

Deploying Rails 4 with ricn/rika gem on Heroku - precompile error

I'm running a Rails application using the Rika gem (JRuby wrapper for Apache Tika). It runs fine locally. In trying to push it to Heroku, it gets a ways into the deployment until I hit the asset precompile:
...
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
No such file to load -- rika
followed by a long string of /tmp/build_8a51... errors.
Precompile works fine on the local machine.
If I try to install the gem via 'heroku run' I get:
$ heroku run gem install rika
Running gem install rika attached to terminal... up, run.8601
ERROR: While executing gem ... (ArgumentError) malformed format string - %)
Any suggestions?
Thanks
Found the problem.
I needed to add the ruby version spec line to the Gemfile. It wasn't necessary on the local machine because I set the version externally. Heroku needs it though.

Resources