I’m following the tutorial here:
I’ve gone through all the steps. My app has a config.ru, a gemfile and a file that just says go! This was just to test the app running on heroku to see how it handled. Sadly I’m getting a very strange error.
Below is my git push as per the tutorial
git push heroku master
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 596 bytes, done.
Total 5 (delta 4), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rack app detected
-----> Installing dependencies using Bundler version 1.1.rc.7
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
Using i18n (0.6.0)
Using multi_json (1.1.0)
Using activesupport (3.2.2)
Using builder (3.0.0)
Using activemodel (3.2.2)
Using bson (1.6.0)
Using mongo (1.6.0)
Using plucky (0.4.4)
Using mongo_mapper (0.11.0)
Using rack (1.4.1)
Using rack-protection (1.2.0)
Using tilt (1.3.3)
Using sinatra (1.3.2)
Using bundler (1.1.rc.7)
Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
-----> Discovering process types
Procfile declares types -> (none)
Default types for Ruby/Rack -> console, rake, web
-----> Compiled slug size is 3.7MB
-----> Launching... done, v5
http://myapp.herokuapp.com deployed to Heroku
To git@heroku.com:myapp.git
d799d9c..93d7d15 master -> master
Seems simple enough. But the heroku ps gives
Process State Command
------- -------------- ------------------------------------
web.1 crashed for 4s bundle exec rackup config.ru -p $P..
Naturally enough I checked the logs but they may as well be in arabic.
/
usr/lib/ruby/1.9.1/net/http.rb:678:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
from /usr/lib/ruby/1.9.1/net/http.rb:678:in `block in connect'
from /usr/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
from /usr/lib/ruby/1.9.1/timeout.rb:89:in `timeout'
from /usr/lib/ruby/1.9.1/net/http.rb:678:in `connect'
from /usr/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
from /usr/lib/ruby/1.9.1/net/http.rb:626:in `start'
from /usr/local/heroku/lib/heroku/client.rb:409:in `read_logs'
from /usr/local/heroku/lib/heroku/command/logs.rb:31:in `index'
from /usr/local/heroku/lib/heroku/command.rb:135:in `run'
from /usr/local/heroku/lib/heroku/cli.rb:9:in `start'
from /usr/bin/heroku:30:in `<main>'
I did think that heroku was running apps on ruby 1.9.2 but thats not important. It would seem I’m missing some sort of ssl cert or variable. I definitely haven’t used any SSL based functions in my ‘go.rb’ script but it still seems to require something.
Can anyone point me in the right direction here?
The config.ru
require './go'
run Sinatra::Application
This issue really haunted me for a while. I still haven’t got to the bottom of the problem but It has been fixed and hasn’t resurface.
The sinatra application just would not start. After checking the logs, I found the word SSL popping up a lot
I wrote another smaller program just to test on Heroku and It had the same error.
I followed the tutorial here and It seemed to resolve the error.