How to install Ruby on Rails on macOS Sierra 10.12

  1. Install Homebrew. Homebrew simplifies the installation of software on Apple’s macOS operating system. Open Terminal and run the following command:
    /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Install Xcode. Xcode is a software package to help you develop iOS and OS X applications. You don’t need the full Xcode package to get the Command Line Tools. Check if the full Xcode package is already installed:
    xcode-select -p

    if you see:

    /Applications/Xcode.app/Contents/Developer

    it means the full package is already installed. If you don’t have it, type this command to install:

    xcode-select --install

    then will appear this :

    xcode-select: note: install requested for command line developer tools.

    An update popup window will appear to install the command line developer tools. You can choose to confirm by clicking “install”. Wait for the Command Line Tools package download to complete.

     

  3. Install Ruby. Run the following commands in your Terminal:
    brew install rbenv ruby-build
    rbenv install 2.4.1
    rbenv global 2.4.1
    ruby -v

    #ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin15]

     

  4. Install Rails
    gem install rails -v 5.0.1

    installingrailinstallingrail2

  5. Execute the Rails with this command:
    rbenv rehash
  6. Verify Rails version:
    rails -v

    #Rails 5.0.1

  7. Setting up a database using mySQL
    brew install mysql

    installingmysql
    To have launchd start mysql now and restart at login:
    brew services start mysql
    Or, if you don’t want/need a background service you can just run:
    mysql.server start

  8. Final steps to create your first Rails application:
    rails new myfirstapp
    rails new myfirstapp -d mysql
    #move to the folder directory
    cd myfirstapp
    #Create the database
    rake db:create
    rails server
  9. Open your browser and type http://localhost:3000 to view your website.localhost.png

How to fill your Mac screen with split view

Enter the split view

  1. Hold down the full-screen button   in the upper-left corner of a window.screen-shot-2017-02-22-at-11-37-40-am
  2. When you hold the button, you can drag it to the left or right side of the screen.
  3. Release the button and do it for another window and put side by side.
  4. To exit split view you can move the pointer to the top of the screen to show the window buttons, then click the full-screen button  .

The result:

Screen Shot 2017-02-22 at 11.52.04 AM.png

How To Open Task Manager For Mac

  • Press Command + Space key to launch Spotlight search.
  • Type ” Activity Monitor” 

Screen Shot 2016-04-30 at 8.35.49 PM

it’s the same like Task Manager in Windows.

Screen Shot 2016-04-30 at 8.49.28 PM

If you want to force quit an application that doesn’t respond, press this key combination: Command + Option + Esc to bring up Force Quit Appplication. Select the application that  you want to close, and click on Force Quit.

Screen Shot 2016-04-30 at 8.57.47 PM.png