|
6 | 6 |
|
7 | 7 | **==** Boolean, a data type with only 2 possible values: True or False (_Is name=="Veronica"? True_).
|
8 | 8 |
|
9 |
| - |
10 | 9 | **cd (or cd ~)** Change into your **home directory**.
|
11 | 10 |
|
12 | 11 | **cd** _directory_ **(or cd ..)** Change into the parent directory of your current directory.
|
|
25 | 24 |
|
26 | 25 | **-h (or --help)** Can be run with all commands to list more helpful information.
|
27 | 26 |
|
28 |
| -**puts** _something_ Prints its argument to the console. Can be used in Rails apps to print something in the console where the server is running. |
29 |
| - |
30 |
| - |
31 | 27 | **git branch** Shows you the branch that you're currently in.
|
32 | 28 |
|
33 | 29 | **git status** Shows you any pending changes that you've created since your last commit.
|
|
39 | 35 | **git commit -m** _"some useful message for your future self"_ Commits all your changes with your descriptive message to git.
|
40 | 36 |
|
41 | 37 | **git push origin** <i>remote\_branch\_name</i> This pushes the code in your current branch to the <i>remote\_branch\_name</i> branch on the remote repo named 'origin'.
|
42 |
| - |
43 |
| - |
44 |
| -**rails new** _NameApp_ Creates a new Rails application with the entire Rails directory structure to run your application. |
45 |
| - |
46 |
| -**rails server (or rails s)** Launches a small web server named WEBrick that you will use any time you want to access your application through a web browser. |
47 |
| - |
48 |
| -**rails generate (or rails g)** Uses templates to create a bunch of directories and files in your application. |
49 |
| - |
50 |
| -**rails generate scaffold** Creates a full set of model, database migration for that model, controller to manipulate it, views to view and manipulate the data and a test suite for each of the above. |
51 |
| - |
52 |
| -**rake** Rake is ‘Ruby Make', used to build up a list of tasks. |
53 |
| - |
54 |
| -**rails console (or rails c)** Lets you interact with your Rails application from the command line, useful for testing out quick ideas with code and changing data server-side without touching the website. |
55 |
| - |
56 |
| -**rails console --sandbox** If you wish to test out some code without changing any data. |
57 |
| - |
58 |
| -**rails dbconsole (or rails db)** Used to figure out which database you're using and drops you into whichever command line interface you would use with. It supports MySQL, PostgreSQL, SQLite and SQLite3. |
59 |
| - |
60 |
| -**rails destroy (or rails d)** Does the opposite of generate. It will figure out what generate did and undo it. |
0 commit comments