Rails intro resources
Dictionary, "the terminal", links to further reading
Dictionary - Programs
program: 1. Text (code) in files 2. Running process
terminal: Program for interacting directly with your computer
(where you type commands, start programs)
server: Running program that responds to queries
client: Running program that sends queries (browser)
database: Server that saves to/restores from disk
web server: Server that runs (your) application code
(available on the Internet, connects to a database)
editor: Program for writing files (programs or normal text)
Dictionary - Programming, tools
programming language: Rules for writing instructions (code)
Ruby: A useful programming language, a 'swiss army knife'
HTML: A specialized language for displaying web pages
ERB: Template for HTML pages (that uses Ruby)
irb: Terminal program for running snippets of Ruby
Gem: Package of ruby code (library, API)
RubyGems: Built-in tool for managing gems
RVM: Ruby Version Manager, handles rubies and gems
Gemset: Group of gems handled by RVM
Bundler: Gem that handles groups of gems... and versions
Gemfile: File used by Bundler to define gems and versions
Dictionary - more tools...
Git: Program for managing versions of your code
GitHub: Web application for working with git in a team
Rake: A program to run special Ruby programs (tasks)
Rails: A set of gems for building web apps
- ActiveRecord: Gem for modelling + database storage
- ActionPack: Gem for controller and view code
- ActionSupport: Mixed bag of helpers
The Terminal
Lets examine an example of a UNIX command:
$ls -al ~
$: "prompt", printed by computer. May include useful info such as time, username, current directory
ls: The program, in this case ls="list files"
-al: Options/Flags, in this case a="include dot-files" and l="long format". Options are optional
~: Argument(s), in this case ~="User's home directory". Some commands - like ls - do not require arguments.
Note: on windows use "dir" instead of ls
The terminal is also called Command Line Interface (CLI)
The Terminal
Common commands:
cd <directory>: change directory
pwd: print working(current) directory
mv <file> <new location/name>: move (rename) file or directory
cp <file> <new file>: copy file
rm, rmdir <file>: remove file, remove directory
mkdir <directory>: create directory
touch <file>: create empty file or change update time of existing file
cat, less, tail <file>: print out content of file. cat: entire file, less: beginning*, tail: end (use with -f to monitor)
man <program>: manual of a program*. Note: this is your help. Try for ex "man cp"
which <program>: location of program. To verify exactly which ruby (for example) you are using
open -e <file>: Mac/OS X special to open file in an editor
*Navigation: space/b to move page down/up and q to exit
References/Links
ralis-resources
By Gunnar Djurberg
ralis-resources
Dictionary, links to further reading, terminal tips
- 234