Tag: Heroku
-
Simple Staging/Test Environment with Heroku – Ruby on Rails
Hey everyone, This is just a quick guide on how to create a test/staging environment with Heroku. — Create staging environment heroku create –remote staging — Push to staging app heroku push staging master — Run rake db:migrate on staging app heroku run rake db:migrate –remote staging — Add pgbackups add ons heroku addons:add pgbackups…
-
Assets:Precompile (Rake Aborted) – Heroku
Hey everyone, I ran into the following error over the weekend while trying to push to heroku: Running: rake assets:precompile rake aborted! could not connect to server: Connection refused Is the server running on host “127.0.0.1” and accepting TCP/IP connections on port 5432? This stackoverflow post helped to solve the issue. All you need to…
-
WARN Could not determine content-length of response body – Ruby on Rails
Hey everyone I was going through my development logs today and noticed that the following line was appearing everywhere: WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true While nothing appeared to be wrong, it made the logs a lot harder to read. A stackoverflow post…
-
Heroku Timezones – Ruby on Rails
Hey everyone, Just a quick post on how to adjust the timezone on Heroku, comes in handy when using the log files. #Console $ heroku config:add TZ=Australia/Brisbane There is a fairly detailed StackOverflow post at the following link if anyone is interested in more info: http://stackoverflow.com/questions/2719330/why-does-heroku-log-using-the-server-time-rather-than-the-rails-time-zone The language options can also be found on the…
-
Stop an Application – Heroku
Just a quick post on how to stop an app on Heroku: root@chris-VirtualBox:~/site# heroku maintenance:on Maintenance mode enabled. This will display a static page to all visitors but still allows for migrations etc: To re-enable the app simply use the following: root@chris-VirtualBox:~/site# heroku maintenance:off Maintenance mode disabled.
-
Heroku Upload – Permission Denied
I ran into a bit of trouble uploading an app to heroku for the first time, I was unable to authenticate. root@chris-VirtualBox:~/site# git push heroku master Permission denied (publickey). fatal: The remote end hung up unexpectedly This turned out to be an issue with my public key, in order to fix it simply create a…
-
PostgreSQL Installation Error – Ruby
I ran into a bit of problem moving an app to a test Heroku host – I needed to install PostgreSQL. I added the following to my Gemfile: #Gemfile #gem ‘sqlite3’ gem ‘pg’ I then tried to run bundle install: root@chris-VirtualBox:~/site# bundle install However I received the following error: root@chris-VirtualBox:~/site# bundle install Fetching source index…