PWS is Pivotal’s public Platform-as-a-Service offering. PaaS systems let you host apps by pushing them to a service rather than having to configure and maintain separate installations of web servers, load balancers and so on. PWS is a hosted installation of the open-source Cloud Foundry project, to which Pivotal is a primary contributor.
Read more »
My last Clojure post covered some TDD, this post is going to discuss how I added migrations and a deployment to Heroku to that same application. I’ve been teaching myself Clojure by rebuilding my simple personal website, so I was cheating a little bit as I already had a database with tables and columns.
Read more »
Interestings Beware of absolute paths when using unicorn and USR2
Using unicorns USR2 signal to restart does NOT re-read your unicorn config so be very careful with Capistrano deployments. See SO Q&A for details below:
Additionally you should specify several things in the config file, specifically the gemfile, or it won’t reload that either.
Read more »
Ask for Help
*"1 git repo, 2 Heroku apps, 2 procfiles? Heroku currently is limited to 1 procfile per repo, so we've created a rake task that branches, modifies the procfile and pushes. Do you have a better solution?"
Is it possible to use env variables to parameterize your Procfile?
"Capybara: How can I click on a flash dialog for webcam settings?"
This was solved by right clicking and going into flash settings and enabling this permission always for this domain. Setting this up on headless CI may be more difficult.
"I have CSS transitions that behave differently when 'user initiated' vs initiated from a setTimeout or other event."
If you look at the network graphs of
heroku_san on github, you'll see a number of branches where the only change is the deletion of the following line from the
If more than a few people are willing to take the effort to fork a gem just so they can delete 1 line, something smells. The reason is that these forkers were using something other than Rails+ActiveRecord+SQL in their project. Some were using Sinatra, others were using Rails, but with CouchDB.
The raison d'être for the
heroku_san gem is to make Heroku deploys dirt simple. So, if people are making whole forks to customize the deploy task, we should make it less painful.
- How many times (each day) have you typed this at your console?
git push heroku masterand then forgotten to run
heroku run rake db:migrate --app yellow-snow-3141or
- Does your script support a multi-stage environments?
- Do you remember how to get to the application's console process?
- Is your application's configuration consistent across all stages?
- Are you deploy scripts tested?
"What's the best admin gem out there?"
"Amazon Web Services is down"
This is one of the longest outages we've seen of Amazon and thus Heroku. So many Ruby applications rely on Heroku that the community is certainly affected. Updates on the damage are on Heroku and Amazon. You can see how far reaching problems on EC2 are on ec2disabled.com
"Obama is in town!"
There have been rumors he is visiting a few notable software companies in the area, hopefully he'll stop by. Watch out for blocked streets for the motorcade.
Some pivots are having trouble with a flash embed tag's scale attribute. The desired behavior is that the movie scale to fit the size of the element. According to documentation, this should just work. The flash content will not scale, instead the content is getting cropped.
Anyone have experience using Amazon RDS with Heroku?
Several projects at Pivotal have used this combination with great success.
- A project had some intermittently slow queries. The problem was traced back to some large strings in one of the columns. The team solved this problem by overriding the default scope, and only selecting the expensive column when needed.
- Bundler + Heroku gotcha: Deploys to Heroku can break if you are using Bundler v1.0.6 in your local development environment (as of this writing, Heroku is using v1.0.3). Apparently the
--deploymentswitch is being stripped off and
Gemfile.lockis rebuilt. If the file differs from what's in the git repository, the deploy will fail with a somewhat mysterious error message. Work-around: Specify the bundler gem version to v1.0.3 (perhaps even up to v1.0.5) in your
bundle install --without testexcludes the test group in your Gemfile from the install. It works well for reducing the size of your Heroku slug. However, there's a glitch with this option on Heroku -- when you specify it, Heroku reinstalls every included gem every time you deploy. It does respect your Gemfile.lock, so you're trading a smaller slug for a longer deploy.
Pivotal's open source CIMonitor project now supports OpenID! Thanks Tyler and Josh.
Arel has a bug that makes it difficult to use in
rails console. Every time you add a predicate, the number of internal objects in the Arel result increases exponentially. So, by the time you have 5 or 6 predicates, the console finishes generating the expression more or less instantly, and then spends 15+ minutes calling
to_son the resulting Arel object in order to display it to you. tl;dr: when you're playing with Arel in rails console, end every line with
; nilto avoid having it print out the result. The exponential object explosion will be fixed in Rails 3.1.