...it will be fixed, I guess it will be for Rails 4 only. The best workaround right now is to lock your version of rack at version...
The Oracle mysql client has an odd behavior if your server uses latin1 as default character-set-server. Command mysql --version mysql Ver 8.0.31-0ubuntu0.20.04.2 for Linux on x86...
...character-set utf8 and set the character set inside the session to circumvent this behavior. Better solutions Use MariaDB mysql client The MariaDB mysql client handles the --default-character-set...
...polymorphic association. class Event < ApplicationRecord has_many :letters, as: :record end class Letter < ApplicationRecord belongs_to :record, polymorphic: true end event = Event.new.letters.build event.save! # => ActiveRecord::RecordInvalid: Validation failed: Record must exist...
...remember to nilify it afterwards. Otherwise other examples will see your global changes. A better way is to use the .with_power method to change the current power for the...
ImageMagick can automatically crop surrounding transparent pixels from an image: convert input.png -trim +repage output.png
If you use transactional_fixtures or the database_cleaner gem with strategy :transaction, after_commit callbacks will not be fired...
...member', :home_page end It has some limitations: Only works for singular member references ("belongs to"), not for a collection of references ("has many") No support for deletion (but could...
...On the database level, you will see these queries (simplified; the number at the beginning of each line is the connection ID): 1 Connect 1 BEGIN 1 INSERT INTO foos...
...you might be doing stuff afterwards that could require to abort the transaction). A better approach As a general rule, never use ActiveRecord::Base.establish_connection and also don't use...
If you migrate a Rails application from Sprockets to Webpack(er), you can either transpile your CoffeeScript files to JavaScript...
You are getting when connecting via SSH or deploying with Capistrano (which uses SSH): Too many authentication failures for username...
After updating Rubygems you see a wall of deprecation warnings like this: NOTE: Gem::SourceIndex#add_spec is deprecated, use...
Two weeks ago, Cloudflare was struck by a global outage that lasted ~30 minutes. The incident was rooted on a...
...skipping asset compilation when assets have not changed? Turns out there is an even better way to speed up Capistrano deployments with asset compilation – and it's even simpler.
Instead of running all missing migrations on your test database with rake db:migrate RAILS_ENV=test you can also...
...Safari, ...) or Firefox, this is only the initial size -- users can resize textareas to become bigger. This is helpful to the user, but may be breaking your application layout in...
This note describes a Cucumber step definition that lets you say: Then "Mow lawn" should be an option for "Activity...
...when you run a Selenium test with Capybara. This will help you understand "impossible" behavior of your tests. When you run a Rack::Test (non-Javascript) test with Capybara, there...
...you. But sometimes the complexity will bleed through, causing your tests to show "impossible" behavior. Here is some unexpected behavior caused by the interaction of threads and processes:
As attachments to this card you will find a Cucumber feature and supplementing step definition that you can use to...
I had a huge MySQL dump that took forever (as in: days) to import, while I actually just wanted to...
We had a strange behaviour on one of our mariadb-servers: Everyday at around midnight we saw that the root-account on one of our servers is trying to access...
We recently decided to put static content for HouseTrip.com to Amazon Cloudfront for a faster user experience. This happens fully...
When your JavaScript bundle is so massive that you cannot load it all up front, I would recommend to load...
Do all of the above, and also Remove all blocks and hooks belonging to craken from your config/deploy.rb. Delete vendor/plugins/craken. Check if you have lib/tasks/craken.rb. If so, delete...
If you are using scrum in a project you might be familiar with planning poker, a playful way to agree...