Fix bundler error "can't find gem bundler (>= 0.a) with executable bundle"

This error message seems to be related to network or Bundler issue, but it isn't - newer version of Bundler requires new version of RubyGems, which is not updated by default. Here, you'll see how to fix this issue.

How to remove deleted branch names from git suggestions?

How to remove deleted branch names from git suggestions? It's as simple as that: ``` git fetch --prune --all ``` Or (thanks to @mus) you can add this...

How to install gem without documentation

Hi, You've probably noticed that installation of gem documentation takes more time than installing gem itself. It can be annoying especially when you've alr...

How to use helper methods in mailer templates

How to use helper methods in mailer templates? Instead of this "include YourHelper" use this "add_template_helper YourHelper" in YourMailer

Fix libv8 / therubyracer installing error

Sometimes, something unexpected grabs our attention - libv8 or therubyracer extensions installation error - here's how to get rid of them!

Example tmux script for Rails

Shell script that will start a tmux session with Rails console and server in side panes

Compiling ES6 syntax with Uglifier on

When you try to compile ES6 syntax with Uglifier gem initialized you get this error: ``` Uglifier::Error: (...) To use ES6 syntax, harmony mode must be e...

How to restore deleted git branch

Short and working solution to restore deleted git branch

How to add images (i.e. logo) to email messages while using Pony gem.

Pony gem allows to easily send good looking and customizable emails, but it doesn't provide a way to include image in a way that it will be displayed in gma...

Puppeteer - good library for generating pdf's from html.

Puppeteer is node library providing high level chromium api. One of it's key features is generating pdf from html using chromium web engine. This is great ad...

https://github.com/GoogleChrome/puppeteer

Prettier raw SQL in ruby

Use this syntax to format raw SQL nicely in ruby code. In some editors it also enables SQL syntax highlighting.

Use React.Fragment to avoid creating useless divs

This jsx ```react <React.Fragment> <h1>Hello World</h1> <p>This is paragraph</p> </React.Fragment> ``` Will be compiled into this html ```h...

How to clear sidekiq queue

How to clear sidekiq queue in 4 steps?

How to inspect an element that disappears on click (in chrome)

In chrome developer tools go to "Sources" find "Event Listener Breakpoints" and select "Mouse -> mousedown". Now each time the event is triggered, chrome wil...

Brakeman - An awesome gem that scans your app against vulnerabilities.

To use Brakeman, the only thing is to install the gem: ``` $ gem install brakeman ``` and then run the single command in Rails application's root dir...

https://github.com/presidentbeef/brakeman

Pundit Decorator

Organize Pundit error messages and redirects in a decorator. Simplify reuse and maintenance

Amazing js library to manipulate rendered table - Tabulator.js

Need filters, remote paginations, search field in table, selecting row and much more ... You will find everything in this library

http://tabulator.info/

Move last commit to a feature branch

When you accidentally commit to master/staging and need to move the commit to a feature branch

Close a frozen ssh session

Properly close a frozen ssh session

Set the same password for all users in one query

Reset devise passwords quickly, even for thousands of users.

Disable `Missing frozen string literal comment.` Rubocop warning

If you use a Rubocop-connected linter in your IDE, one thing that keeps driving you mad is `Missing frozen string literal comment.` warning. In this post, I'll show you how to disable it.

Generate fake screenshot mockups in minutes

This app allows you to upload screenshots and paste them into a fake phone/laptop mockup.

https://mockuphone.com/