Consider the following HTML & CSS: ^ img { background-color: red; } div { border: 1px solid black; } This will leave a margin of...
If your project uses another version than your default Ruby, RubyMine will give you incorrect inspections, for example.\
When requests arrive at the application servers simultaneously, weird things can happen. Sometimes, this can also happen if a user...
Slides presenting ways to integrate the ideas of Aspect-Oriented Programming in Ruby. Outline Why Aspect-Oriented Programming?
If you get an error like this ... can’t find executable rails for rails-3.2.3 (Gem::Exception) ... one of several...
OCRA (One-Click Ruby Application) builds Windows executables from Ruby source code. The executable is a self-extracting, self-running...
Controller responses often include Javascript code that contains values from Ruby variables. E.g. you want to call a Javascript function...
How to get a backtrace from a running Ruby process: Ruby 2.6 # First, find out the PID of your Ruby...
TL;DR {} binds stronger than do … end (as always in Ruby, special characters bind stronger than words) Demo
This card needs to be updated for Rails 3+. Since there is no --debugger flag you need to run:
The following two hints are taken from Github's Ruby style guide: If your regular expression mentions a lot of...
This will give you the string that appears most often in an array: names = %w[ foo foo bar bar bar...
Capybara has a global option (Capybara.ignore_hidden_elements) that determines whether Capybara sees or ignores hidden elements.
After you configured your ODBC describe in Fix [RubyODBC]Cannot allocate SQLHENV when connecting to MSSQL 2005 with Ruby 1.8.7...
I followed this nice guide Connecting to MSSQL with Ruby on Ubuntu - lambie.org until I ran in the following errors...
Nice article to educate your non-geek girlfriend/boyfriend about the joys of programming.
Pour color on your Rails console with awesome_print. Turn confusing long strings into formatted output. Have objects and classes...
Install libreadline: sudo apt-get install libreadline-dev Reinstall the ruby and tell rvm where to find readline
Your current ruby must be Ruby Enterprise. gem install passenger passenger-install-apache2-module Edit your httpd.conf according to the...
When you are calling a method that may raise an exception that you don't care about, you might think...
REST Client is a nice, simple HTTP client library for Ruby. When you do a simple GET request like that...
Copy the attached file to config/initializers/indent_string.rb and you can say "foo".indent(4) # " foo" Note you will find many simpler...
Imagine you have a piece of code that tries to send a request to a remote server. Now the server...
ProgressBar is a simple Ruby library for displaying progress of long-running tasks on the console. It is intended to...