===========================rails Command =====================================
1. Create controler:welcome; action:index
$ rails Generate Controller Welcome index
2. Create a model definition named article title:string text:text
$ bin/rails Generate model article title:string Text:text
$ bin/rake db:migrate Migrating data
3. Create Model Add Association
$ rails Generate model Comment commenter:string body:text article:references
4. Add a rest action in the file config/routes.rb
Rails.application.routes.draw do
Resources:articles
End
$ bin/rake Routes
5. Go to the console
Rails C
===========================ubuntu Command =====================================
Git add store to local
git commit-m ' message ' When the tag is stored (where it was modified to facilitate the next query)
Git Pul Download server code
git push upload code to server
===========================ubuntu Command =====================================
< a > installation file
I. How to install the Deb package
sudo dpkg-i *.deb
Second, compile the installation method
Building a compilation environment
sudo apt-get install build-essential
To the source code of the compressed document, unzip it into the/tmp directory, enter the/tmp/software directory, and then execute the following three commands:
1./configure 2 make 3 sudo make install
eg
Install dependent packages
0. sudo apt-get install build-essential
1. Unzip
TAR-ZXF nagios-4.0.2.tar.gz
2. Enter the catalogue
CD nagios-4.0.2
3. Configuration
./configure--prefix=/usr/local/nagios
4. Compiling
Make all
5. Installation
Make install && make Install-init && make Install-commandmode && make Install-config
Three, Apt-get installation method
sudo apt-get install software name
< two > Uninstall software
1. Software uninstall: sudo apt-get purge software name
2. Delete package includes configuration file sudo apt-get remove--purge software name
3. Update Source: sudo apt-get update
< four > Delete files
sudo rm-rf folder name
Continuous update ...
Ubuntu rails git common commands