Fix: FreeBSD is not able to connect to the network
This article
Show archive.org snapshot
from the FreeBSD Handbook suggests that editing /etc/rc.conf
enables DHCP. Unfortunately, some times this seems not sufficient.
Try a reboot, or start the DHCP client manually with the command
dhclient <network adapter>
You can find a list of network adapters by running ifconfig
. Examples are em0
or lo0
.
Related cards:
Connect to a VirtualBox guest machine over the network
You must reconfigure the guest so it will get its own IP address:
- Shutdown the guest
- In the guest's VirtualBox settings, choose Network and switch the network adapter type to Bridged
- Restart the guest
- Read the guest's IP address from ...
How to fix: Session hash does not get updated when using "merge!"
tl;dr: Do not use merge!
for session hashes. Use update
instead.
Outline
Let's assume you're modifying the Rails session. For simplicity, let's also assume your session is empty when you start (same effect when there is data):
# In o...
How to fix "Exit with code 1 due to network error: ProtocolUnknownError" with wkhtmltopdf
New versions of wkhtmltopdf dissallow file://
URLs by default. You can allow them by passing --enable-local-file-access
.
If you are using PDFKit, set the option
PDFKit.configure do |config|
config.default_options = {
enable_loc...
Heads up: expect(object).to receive(:method_name) does not execute the original implementation of the method
Let's assume that we have a model Movie
that registers a callback function when a new instance of Movie
is created (Note: For the purpose of this card it is not important what that callback does or which type of callback it is).
This is how...
How to fix: "git diff" does not show umlauts (or other non-ASCII characters) properly
When using git diff
, you might encounter weird characters where umlauts (or any other UTF-8) characters should be. It looks like this:
R<C3><BC>ckg<C3><A4>ngig # should be "Rückgängig"
However, not Git is to blame [but the less
comma...
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
]...
How to fix: Pasting in IRB 1.2+ is very slow
IRB 1.2 (shipped with Ruby 2.7, but works on 2.5+) brings pretty syntax highlighting and multiline cursor navigation. However, pasting longer contents is incredibly slow. You can fix that by disabling said features. [1]
[Ruby 3.0.0-pre2 solved ...
ActiveRecord::RecordNotFound errors allow you to query the :name and :id of the model that could not be found
ActiveRecord::RecordNotFound
errors provide quite meaningful error messages that can provide some insight on application details. Consider the following:
ActiveRecord::RecordNotFound: Couldn't find Organisation::Membership with 'id'=12 [WHE...
How to fix "Command "webpack" not found"
I just ran into this deployment error after switching from the asset pipeline to webpack:
01:05 deploy:assets:precompile
01 bundle exec rake assets:precompile
01 Compiling...
01 Compilation failed:
01 yarn run v1.22.5
...
How to fix webpack-dev-server not found
The bin/webpack-dev-server
command is not as smart as e.g. rails server
, where it shows the proper fix within the error message.
$ bin/webpack-dev-server
yarn run v1.19.1
e...