2 Rails 2.1 DBMS PicoPlanner SimpleGreeter DBMS Ruby on Rails 3 PostgreSQL MySQL SQLite3 SQLite3 2.2 Web PicoPlanner pico planner 11
2 Rails pico planner camel case camel pico planner _ pico_planner snake case snake - chain case chain pico planner pico-planner CSS id class 2.3 Rails PicoPlanner $ cd ~/projects $ rails new pico_planner -B -C -T -d sqlite3 $ cd pico_planner rails new 1 2.1 bundle install Gemfile -B -C -T PicoPlanner -d DBMS -d DBMS SQLite3 12
2.4 Gemfile 2.1 rails new -B bundle install -C ActionCable -T -d sqlite3 DBMS SQlite3 -d mysql DBMS MySQL -d postgresql DBMS PostgreSQL rails new 1 app/views/layouts/application.html.erb config/application.rb 2.4 Gemfile Gemfile PicoPlanner Gem 1 Gemfile 1 source 'https//rubygems.org' 2 3 git_source(github) do repo_name 4 repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") 5 "https//github.com/#{repo_name}.git" 6 end 13
2 Rails 7 8 + ruby '2.3.3' 9 10 # Bundle edge Rails instead gem 'rails', github 'rails/rails' ruby 2.3.3 2.3.3 ruby PicoPlanner ruby PicoPlanner ruby Gemfile # Gemfile Gemfile 1 source 'https//rubygems.org' 2 3 git_source(github) do repo_name 4 repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") 5 "https//github.com/#{repo_name}.git" 6 end 7 8 ruby '2.3.3' 9 10 gem 'rails', '~> 5.0.1' 11 gem 'sqlite3' 12 gem 'puma', '~> 3.0' 13 gem 'sass-rails', '~> 5.0' 14 gem 'uglifier', '>= 1.3.0' 15 gem 'coffee-rails', '~> 4.2' 16 17 gem 'jquery-rails' 18 gem 'turbolinks', '~> 5' 14
2.4 Gemfile 19 gem 'jbuilder', '~> 2.5' 20 21 group development, test do 22 gem 'byebug', platform mri 23 end 24 25 group development do 26 gem 'web-console', '>= 3.3.0' 27 gem 'listen', '~> 3.0.5' 28 gem 'spring' 29 gem 'spring-watcher-listen', '~> 2.0.0' 30 end 31 32 gem 'tzinfo-data', platforms [mingw, mswin, x64_mingw, jruby] Gemfile 10 Gemfile 10 - gem 'rails', '~> 5.0.1' 10 + gem 'rails', '= 5.0.1' Rails '~> 5.0.1' bundle update Rails 5.0. 5.0.1 Rails 5.0.1 Gemfile coffee-rails Gemfile 15 - gem 'coffee-rails', '~> 4.2' 15
2 Rails JavaScript CoffeeScript Gem PicoPlanner Gemfile 2 Gemfile 31-32 - gem 'tzinfo-data', platforms [mingw, mswin, x64_mingw, jruby] tzinfo-data Windows JRuby Gem Gem $ bundle install 2.5 $ ls db seeds.rb db seeds.rb $ rails dbcreate 16
2.6 Bootstrap Font Awesome Created database 'db/development.sqlite3' Created database 'db/test.sqlite3' db $ ls db development.sqlite3 seeds.rb test.sqlite3.sqlite3 development.sqlite3 test.sqlite3 Ruby on Rails 5.0 2.6 Bootstrap Font Awesome Bootstrap Font Awesome 9 Gemfile Gemfile 18 gem 'jbuilder', '~> 2.5' 19 + 20 + gem 'bootstrap', '4.0.0.alpha6' 21 + gem 'tether-rails' 22 + gem 'font-awesome-sass' 23 24 group development, test do 17
2 Rails $ bundle install $ rm app/assets/stylesheets/application.css application.scss app/assets/stylesheets/application.scss (New) 1 @import 'bootstrap'; 2 @import 'font-awesome-sprockets'; 3 @import 'font-awesome'; 4 @import '*'; app/assets/stylesheets application.scss 4 @import '*'; SCSS $ touch app/assets/stylesheets/main.scss app/assets/javascripts application.js app/assets/javascripts/application.js 13 //= require jquery 14 //= require jquery_ujs 15 //= require turbolinks 16 + //= require tether 17 + //= require bootstrap-sprockets 18 //= require_tree. app/views/layouts application.html.erb 18
2.7 README.md app/views/layouts/application.html.erb 1 <!DOCTYPE html> 2 <html> 3 <head> 4 + <meta name='viewport' content='width=device-width, initial-scale=1'> 5 <title>picoplanner</title> viewport meta width=device-width initial-scale=1 2.7 README.md README.md README.md 1 # README 2 3 This README would normally document whatever steps are necessary to get the 4 application up and running. README.md 1 # PicoPlanner 2 3 Ruby on Rails 5.0 Rails 4 5 ## 6 7 * macos 10.12 OS X v10.11 Ubuntu 16.04 19
2 Rails 8 * Ruby 2.3.3 9 10 ## 11 12 ```text 13 $ gem install bundler 14 $ bundle install 15 $ rails dbsetup 16 ``` 17 18 ## 19 20 ```text 21 $ rails s 22 ``` README.md Rails Markdown Markdown HTML 1 # HTML h1 5 2 ## HTML h2 7 8 * 12 16 HTML pre ```text $ gem install bundler $ bundle install $ rails dbsetup ``` 3 ``` 12 text Ruby ruby Markdown Ruby 20
2.7 README.md Atom ctrl + shift + M Markdown 2.1 2.1 Markdown README.md Rails README.md Rails 21
2 Rails Rails README.md GitHub 22