Fixing wall of warnings: already initialized constant Etc::PC_SYMLINK_MAX
These warnings are printed when the etc
Gem is installed, while etc
is also included in Ruby. Fix with:
gem uninstall etc
Related cards:
Fixing wall of net/protocol warnings
After upgrading to Rails 6.1.7.2 one of our apps printed a wall of warnings while booting:
/var/www/app/shared/bundle/ruby/2.6.0/gems/net-protocol-0.2.1/lib/net/protocol.rb:68: warning: already initialized constant Net::ProtocRetryError
/home...
Fix warning "already initialized constant Mocha" with Rails 3.2
You either have an old version of Mocha and an edge version of Rails 3.2, or you have a new version of Mocha and an old version of Rails. The best solution is to update Mocha to the latest version and switch to Rails edge.
If you are using `shoul...
How to: Specify size of Selenium browser window
Applications often show or hide elements based on viewport dimensions, or may have components that behave differently (like mobile vs desktop navigation menus).
Since you want your integration tests to behave consistently, you want to set a specif...
The challenging setup of an offshore project
After managing a few agile projects from India and learning the tricks of the trade, I have been wondering why life is much easier when you are working closely with the client as compared to working offshore. What worried me more was that I had to...
Fixing "A copy of Klass has been removed from the module tree but is still active"
This can happen during development when classes without automatic reloading are pointing to classes with automatic reloading. E.g. some class in lib
is calling Model.static_method
.
Workaround A
Stop referencing autoloaded classes fro...
Maximum size of a MySQL query
Unless you changed the default, this will be 16 MB:
mysql> SHOW VARIABLES WHERE Variable_name="max_allowed_packet";
+--------------------+----------+
| Variable_name | Value |
+--------------------+----------+
| max_allowed_packet...
Sass: get rid of deprecation warnings in dependencies
TLDR: sass >= 1.35.0
has the option quietDeps
to silence deprecation warnings from dependencies.
quietDeps: If true, the compiler must not print deprecation warnings
for stylesheets that are transitively loaded through an import pat...
List of handy Ruby scripts to transcode different file types (often by using GPT)
It's 2024 and we have tools like ffmpeg, imagemagick and GPT readily available. With them, it's easy to convert texts, images, audio and video clips into each other.
For the everyday use without any parameter tweaking I'm using a collection of ti...
How to overwrite and reset constants within Cucumber features
In order to save the original value of a constant, set the new value and restore the old value after a scenario was completed, you can use the following helper. It takes care of saving the old constant value, setting the new one without throwing w...
Fixing "uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)"
RubyGems 1.6.0 has undergone some changes which may cause Rails 2.x applications to break with an error like this one (e.g. when running script/server):
/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:55: uni...