Fun look at the bug/bugfix that caused the Ruby reject! method to go from linear complexity – O(n) – to quadratic complexity – O(n^2) – starting in Ruby 1.9.3*
*Since fixed in Ruby 2.3
Fun look at the bug/bugfix that caused the Ruby reject! method to go from linear complexity – O(n) – to quadratic complexity – O(n^2) – starting in Ruby 1.9.3*
*Since fixed in Ruby 2.3
A few months ago the creator of my favorite rails server (puma) announced a version of puma called puma-dev. This new server bears more than a passing resemblance to pow, because of its goal of making local rails development stupendously easy.
I was a big fan of pow when it first came out but I eventually stopped using it when it as development on it slowly crawled to a halt then eventually stopped. Having come to Rails development from a PHP background, where the server was always available,
`puma`
or `rails s`
to start working on a local application, or …So I was definitely looking forward to having it pick up from where I left off with pow
Setup is super easy. First make sure to include puma in your Gemfile
gem 'puma'
Then run `puma`
at the command line and make sure your app starts up with no problems.
Next install puma-dev
brew install puma/puma/puma-dev sudo puma-dev -setup puma-dev -install
To setup yourdomain.dev (for example), you’d just run
puma-dev link yourdomain /path/to/your/app
And voila!
I’ve been using this setup for a few months now, and I must say, I find this immensely useful because I have an apache server running on port 80 for my PHP work, so I can actually access a domain on https://mydomain.dev. It also supports websockets!
Things to note
`touch tmp/restart.txt`
from rails root