create an empty project and add a Gemfile
cd ~/Desktop
mkdir project-name
cd project-name
touch Gemfile| sudo pacman -S libmagick6 | |
| PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig gem install rmagick | |
| # or with bundler: | |
| PKG_CONFIG_PATH=/usr/lib/imagemagick6/pkgconfig bundle install |
In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So ⌘ + D does not mean hold shift. ⌘ + Shift + D does of course.
| Function | Shortcut |
|---|---|
| New Tab | ⌘ + T |
| Close Tab or Window | ⌘ + W (same as many mac apps) |
| Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
| Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
| #go to hb_hba.conf | |
| local all postgres ident | |
| #go to psql | |
| sudo -u postgres psql | |
| #enter the following command to set or change the password | |
| ALTER USER postgres PASSWORD 'actual_password'; | |
| #go to hb_hba.conf to change this line back |
Method lookup is a simple affair in most languages without multiple inheritance. You start from the receiver and move up the ancestors chain until you locate the method. Because Ruby allows you to mix in modules and extend singleton classes at runtime, this is an entirely different affair.
I will not build contrived code to exemplify the more complicated aspects of Ruby method lookup, as this will only serve to confuse the matter.
When you pass a message to an object, here is how Ruby finds what method to call:
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |