Right-click Terminal from the Application/Utility folder, Get Info, tick the “Open using Rosetta” box. Uninstall Homebrew Reinstall Homebrew/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)” Restart terminal Check Homebrew is working fine: brew doctor Reinstall openssl: brew install openssl Install Ruby: rvm install 2.5.3 Or any version Solution for: Ruby 1.8.7 Mac OS Bigsur __rvm_make -j8′Solution for: Cannot install ruby-2.2.7 on Mac … Read more Ruby 1.8.7 Mac OS Bigsur __rvm_make -j8 | Error running ‘__rvm_make -j16’
Observers 🧐 Observer lives longer.It can be attached & detached at any time.It is used when method is not directly associated to life cycle of Active Record objects.If you want to create observer with command-line you need to add gem first because without observer gem you couldn’t run any observer generator command so first add … Read more Ruby on Rails : Callbacks V/S Observers
Flite is an open-source library that provides to convert text to speech with some configurations as well like slow speed, high speed, and increase volume as well. Here is Command #1 Above command with generate flite.mp3(you can give any name like rubyonrails.mp3) and play this in the music player. #2 The above command is generate … Read more How to make slow audio using Flite Library
In Rails, you can query the database through ActiveRecord methods to access table data. And this one ActiveRecord methods is Where, today we are learn multiple ways to use Where method in rails. If you want to fetch multiple data into one single query then use where method. ActiveRecord gives you a number of ways … Read more How to Use Where Method In Rails
One of the fundamental principles Rails developers follow is Don’t Repeat Yourself (DRY).🔁 We can use concerns, to avoid repeating the same routes defined. To eliminate code duplication rails introduced the routing method :concern. The :concerns option can accept one or more routing concerns.