A quick fix for an annoying (and not very descriptive) error Browsing context has been discarded when setting up Ruby on Rails system tests with Firefox headless.
This a very short note on setting up Capybara to correctly follow redirects with Rails classic
redirect_to @object pattern. Continue reading
Ruby on Rails come with three environments by default – development, testing and production. But sooner or later one has a need for staging environment. And don’t get me wrong, you can (or should?) use the production settings there, but if you run it locally or on the same server as production, chances are you need a different database. And while you are at it, it may be handy to allow logging to console or change any other of Rails settings for that matter. In fact you can create as many other environments as you want and since it’s really easy I encourage you to do so. Continue reading