Installing the typhoeus Rubygem on Ubuntu 14.04
Make sure you have libcurl3-dev
installed:
sudo apt-get install libcurl3-dev
gem install typhoeus
Related cards:
How to enable the Thinkpad microphone mute key on Ubuntu 16.04
While the hardware mute button of my Lenovo x230 worked on Ubuntu 14.04 out of the box, it does not on Ubuntu 16.04. It is fairly simple to fix, though.
There is an extensive answer on Ask Ubuntu, but only part o...
Manage Linux services on the command line (Ubuntu)
Ubuntu 18.04 uses systemd
to manage services.
There are basically two commands for listing all services and manipulating the state of a certain service: service
and systemctl
:
-
service
manages System V init scripts -
systemctl
control...
Rails: Custom validator for "only one of these" (XOR) presence validation
For Rails models where only one of multiple attributes may be filled out at the same time, there is no built-in validation.
I've seen different solutions in the wild, each with different downsides:
- Private method referenced via
validate
: wor...
The Ruby Object Model
In Ruby (almost) everything is an Object
. While this enables a lot of powerful features, this concept might be confusing for developers who have been programming in more static languages, such as Java or C#. This card should help understanding t...
Installing Adobe Reader on Ubuntu
Adobe no longer supports their PDF reader on Linux and the official page does not offer it for download. \
However, some files may not display properly on Ubuntu's default PDF reader Evince or PDF forms may not work as expected. Hence, you may st...
How to install the `xelatex` binary on Ubuntu 14.04
Just install the texlive-xetex
package:
sudo apt-get install texlive-xetex
Running integration tests without texlive-xetex
will produce an error during xelatex
execution:
RTeX::Document::ExecutableNotFoundError
Lightning Talk: Coverage based Test Case Prioritization in Ruby on Rails
For my computer science bachelor's thesis I programmed and evaluated a CLI Test Case Prioritization (TCP) tool for makandra. It has been written as a Ruby Gem and was tested and evaluated against one Ruby on Rails project....
Postgres: DISTINCT ON lets you select only one record per ordered attribute(s) for each group
-
To retrieve only unique combinations of the selected attributes: You can omit rows, where all selected columns are equal with the
DISTINCT
statement. - To retrieve the group wise maximum of certain columns: You can keep only one record fo...
Files open with an error "the location is not a folder" after installing XFCE
When using gnome-open
(i.e. double-clicking a file, telling to browser to open a download, etc.) on Ubuntu you may get this error:
The location is not a folder.
It's due to the exo-utils
package which [does not play nice with gnome-open
]...
Installing therubyracer and libv8 with Ruby 1.8 on OSX Mavericks
There seems to be no way to use therubyracer -v '0.11.4'
and libv8 -v '3.11.8.17'
on OS X Mavericks.
However, running bundle update therubyracer
worked for me. It installed therubyracer -v '0.12.1'
and libv8 -v '3.16.14.3'
and I had not...