-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heroku compatibility (WIP) #33
base: master
Are you sure you want to change the base?
Conversation
Heroku can't use [email protected] URLs.
CORS-compliant browsers will make this request before allowing the notify request.
|
||
# SERVER | ||
gem 'puma' | ||
gem 'jruby-openssl', platform: :jruby |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest version of JRuby includes the OpenSSL library by default. Including the gem only gets you a bunch of "Already initialized constant" warnings.
Hmm, pre-compiling assets doesn't appear to work for me in terms of making the app accessible in production. Everytime it tries to start the server it gets: Could this have to do with the version of RubyGems heroku has available on the Cedar stack? It appears significantly behind the one I have locally.
|
IIRC, the |
Ah, right — you have to do |
But that won't help on heroku will it? I think they have a set version of Rubygems. My local squash app ran flawlessly under RubyGems 1.8.5, it wasn't until I tried putting it on the old RubyGems that heroku is using that I get this error. And I think @RISCfuture had it slightly backwards -- it appears the functionality was added in newer versions and the |
I was looking at the wrong thing. I have rubygems 1.8.24 on development, and
|
I just verified that a brand new app ( |
I wasn't using this branch to try to get it to work -- I added |
I don't believe you actually have to precompile the assets. I used |
Ah, I hadn't heard of user-env-compile. Whether JRuby is required seems to be an open question. |
OK, so where do we stand on this? In my understanding...
Anything else? |
This is a work in progress to get Squash to work on Heroku.
You have to precompile assets in development because there is no environment set up when Heroku runs the precompile. This could theoretically be fixed by removing all of Squash's dependencies on environment settings, database connections, etc. in the precompile step. Meanwhile, set up a production database on the dev machine and do this (or equivalent) to deploy to Heroku:
The remaining problem is that about 3 out of 4 times the server process takes longer than 60 seconds to start up, so Heroku gives up (see Heroku docs). This timeout can't be adjusted. Either something is wrong, or that's just how long it takes to start up. In the latter case, there is a workaround where you start a proxy server to satisfy Heroku that forwards requests once the real server gets started.