The attached article explains options you have to store the order of items in a database table. The simplest solution...
Boot partitions from installations prior to the 16.04 era are terribly small. When you install updates and encounter errors due...
You might have some trouble running a Rails LTS 2 app with MySQL 5.7. If you don't want to...
MySQL and MariaDB have an SQL mode setting which changes how MySQL behaves. The SQL mode value is comprised of...
Rails offers a way to prepend (or append) view paths for the current request. This way, you can make the...
When you have string contents (e.g. a generated binary stream, or data from a remote source) that you want to...
You need to update a lof gems. Make sure you don't have any version constraints in your...
Running rails server will start a local server that you can access via http://localhost:3000. When you are working...
Use bundler > 1.15 to fix Gem::LOADED_SPECS_MUTEX (NameError). Given the following project: ruby -v ruby 1.8.7
When your Rails controller calls render, you can pass a :status option for the HTTP status code: render 'results', status...
When a Rails controller action should handle both HTML and JSON responses, do not use request.xhr? to decide that. Use...
Katapult 0.3.0 brings Rails 5 and Ruby 2.5 support with a new design, plus a ton of smaller features, fixes...
If your Rails application is using Webpack you need to serve assets on the same host as you application runs...
ActiveSupport::Dependencies takes care of auto-loading any classes in development. This is usually useful, but when you run into...
This is an extension to PostgreSQL vs MySQL: How to UPDATE using a JOIN. UPDATE employees SET department_name = departments.name...
TL;DR Use user.update!(remove_avatar: true) to delete attachments outside of forms. This will have the same behavior as...
This is a small example on how you can check if your Postgres index can be used by a specific...
The issue: You are using stub_const to change a constant value for your test. stub_const "SomeClass::CONST", 'test...
This error is raised because your old database does not have a configured environment yet, which Rails 5 enforces.
Rails applications and ruby gems should have a README that gives the reader a quick overview of the project. Its...
You should avoid using application models in your migrations. But how else could you create records in a migration?
PostgreSQL's Common Table Expressions (CTEs) can be used to extract sub-queries from bulky SQL statements into a temporary...
PostgreSQL supports the SQL OVERLAPS operator. You can use it to test if two date ranges overlap: => SELECT ('2001-02...
In most projects I know, Cucumber test suite speed is not an issue. Of course, running 350 features takes its...