Hack hack hack...

An open journal-- some of it written for you, but most of it is for me.

Back to Sinatra

  • Couldn’t launch on heroku because I didn’t have a gemfile.
  • Then I could removed all the gem requirements from the top of the main.rb file. Not how it’s done.

  • Since I need two different keys to for FB authentication I configured them in the main app.rb file. I tried setting these in a .env file and start up the app locally with foreman, but I couldn’t get it to work.

1
2
3
4
5
6
7
8
9
10
11
class MyApp < Sinatra::Base
  configure :development do
    ENV["FACEBOOK_APP_ID"]='numbers'
    ENV["FACEBOOK_SECRET"]='key'
  end

  configure :production do
    ENV["FACEBOOK_APP_ID"]='numbers'
    ENV["FACEBOOK_SECRET"]='key'
  end
end

Found this solution on stackoverflow

Comments