Posts

Showing posts from March, 2023

Ruby Version Manager

You might encounter the following error when you try to do gem install ERROR : While executing gem ... (NoMethodError) undefined method `request' for nil :NilClass [ @failed_dep .dependency, @activated .request.dependency] ^^^^^^^^ The error was produced because of the mismatched version of Ruby. To resolve this error, you can download a Ruby version manager. In this case, I use rbenv If you have homebrew installed, you can type this code brew install rbenv in the terminal After installing, check the current ruby version, ruby -v Check the path, which ruby Run the following to change the path (replace YOUR_USERNAME with your user name, in my case woodylin@woodys-air ~ % woodylin is my username.) export PATH="/Users/YOUR_USERNAME/.rbenv/shims:$PATH" export PATH="/Users/woodylin/.rbenv/shims:$PATH" Check the path again, which ruby Install the desired version, in my case, rbenv install

Unix Essentials

Unix Essentials Unix commands are typed at the command line after the prompt They usually have the form COMMAND OPTION ARGUMENT( S ) Where the option is preceded by "-" or "--" We can hit the Enter key to execute the command We can type part of the file name, then hit the Tab key to complete the rest We can run the previous commands again, just hit the up arrow key , ↑ We can abort the program by holding down Control key while hitting C Here are more useful shortcut keys Ctrl A - Moves the cursor to the beginning of the line Ctrl E - Moves the cursor to the end of the line Ctrl D - Logs out of the current session Ctrl U - Erases the complete line Ctrl R - Allows you to search for a previously used command or switch Basic Unix Commands To list the contents of the current directory; ls stands for list ls To go to a new directory; cd stands for change directory(same thing as folder) cd NAME_OR_ADDRESS_OF_DIRECTORY To

My First Post on Blogger

 Let's see if I can embed it into my website.