Friedrich Ewald My Personal Website

Recent Posts


  • Conflicting dependencies in Ruby

    I installed two different Ruby projects on my local system which both depended on different versions of bigdecimal. One project required bigdecimal version 4.0.1, while the other needed version 3.3.1. When I tried to run the second project after installing the first, I encountered a conflict because both projects were trying to use different versions of the same gem. Finding the different versions of bigdecimal can be done via

     gem list bigdecimal
    
    *** LOCAL GEMS ***
    
    bigdecimal (4.0.1, 3.3.1, 3.1.9, 3.1.8)
    
    Then remove the conflicting version using
    gem uninstall bigdecimal -v 4.0.1
    
    The cleanest fix is to set bundler to use a specific folder for dependencies for each project. This way, each project can have its own set of gems without conflicts. You can do this by running:
    bundle config set path 'vendor/bundle'
    
    This command tells Bundler to install gems in the vendor/bundle directory within each project, allowing each project to maintain its own dependencies without interfering with each other. After running this command, you can run bundle install in each project, and it will install the required gems in their respective directories. This approach ensures that each project can use the specific version of bigdecimal it requires without any conflicts, and you can switch between projects without worrying about dependency issues.

  • MariaDB error logs on Linux

    To access the MariaDB error logs on a Linux system, you follow the system journal and follow the events in real time:

    sudo journalctl -u mariadb -f
    

  • Happy 2026

    Time flies - Happy 2026!

  • Mass remove git branches

    To mass remove git branches from a git repository, you can use the following commands:

    git branch | grep 'fewald' | xargs git branch -D
    
    This command does the following:
    1. git branch: Lists all local branches in the repository.
    2. grep 'fewald': Filters the list of branches to only include those that contain the string ‘fewald’.
    3. xargs git branch -D: Passes the filtered list of branches to the git branch -D command, which forcefully deletes each branch.

  • Tensorflow Metal

    I was looking for a way to speed up my Tensorflow models on my Macbook Pro.

    import tensorflow as tf
    
    

Previous Page: 1 of 34