Sometimes you add Paperclip image styles, sometimes you remove some. In order to only keep the files you actually need...
ActiveRecord::RecordNotFound errors provide quite meaningful error messages that can provide some insight on application details. Consider the following:
I needed to make sure that an element is visible and not overshadowed by an element that has a higher...
When using GROUP BY, MySQL now complains if the SELECT includes columns which are not part of the GROUP BY...
Nowadays it is fairly easy to intercept and modify mails globally before they are sent. All you have to do...
By default Middleman generates files with a .html extension. Because of this all your URLs end in /foo.html instead of...
Middleman is a static page generator that brings many of the goodies that Rails developers are used to.
Dump this method into your Ruby console to quickly print data in columns. This is helpful for e.g. comparing attributes...
Assuming you're wanting to undo the effects of git rm or rm followed by git add -A or something...
This card compares patterns to store trees in a relation database like MySQL or PostgreSQL. Implementation examples are for the...
When you load a dump for development, records may reference images that are not available on your machine.
on the bash (issued as postgres user) Start/Stop/Restart PostgreSQL pg_ctl -D $configdir start|stop|restart Start/Stop/Restart the corresponding PostgreSQL...
Using VCR to record communication with remote APIs is a great way to stub requests in tests. However, you may...
Add the following to /etc/rc.local: (sleep 3 && echo disable > /proc/acpi/ibm/bluetooth)& Bluetooth icon will be active for a few seconds, then...
Just like we use gems on the server, we use third party JavaScript libraries in the browser. These typically provide...
If you have a replication error with MySQL and you know the "error" is okay (e.g. you've executed the...
Sometimes huge refactorings or refactoring of core concepts of your application are necessary for being able to meet new requirements...
Exercise 1: XML On the start page of your Movie DB, show the title of a random movie that is...
So you're getting this failure when running bundle install on an older project: Your Gemfile.lock is corrupt. The following...
Like you know from "How to tell ActiveRecord how to preload associations (either JOINs or separate queries)", you can tell...
This method will remove automatically installed packages that no other packages depend on any more. This, of course...
When you're writing specs for ActiveRecord models that use memoization, a simple #reload will not do: it 'updates on...
When working with custom transactions and use ActiveRecord::Rollback you may encounter unexpected behaviour if you try to roll back...
If you want to find the commits that touched a specific text in a file, use git log -S 'text...