$ rails g model User
belongs_to
has_one
| #!/usr/bin/env bash | |
| # Tested for Ubuntu 12.04 | |
| [[ "$(id -u)" -ne "0" ]] && echo "must be root!" && exit 1 | |
| RBVER="1.9.3-p194" | |
| apt-get update | |
| apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev wget rsync |
| CREATE TABLE test ( | |
| id INT NOT NULL AUTO_INCREMENT, | |
| last_name VARCHAR(255) NOT NULL, | |
| first_name VARCHAR(255) NOT NULL, | |
| PRIMARY KEY (id) | |
| ); | |
| drop procedure prepare_data; | |
| delete from test where id>0; |
| #!/usr/bin/env ruby | |
| # Put this file in /script/ directory. | |
| require 'rails/commands/server' | |
| Rails::Server.new.tap { |server| | |
| APP_PATH = File.expand_path('../../config/application', __FILE__) | |
| require APP_PATH | |
| Dir.chdir(Rails.application.root) | |
| server.start |
| #!/bin/sh | |
| gnome-terminal \ | |
| --tab -t "guard" --working-directory=$HOME/projects/my_project \ | |
| --tab -t "server" --working-directory=$HOME/projects/my_project \ | |
| --tab -t "console" --working-directory=$HOME/projects/my_project \ | |
| --tab -t "cli" --working-directory=$HOME/projects/my_project \ | |
| --tab -t "root" --profile=root |