Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
[Rails 开发入门课程] 第一节 Rails 运行环境
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
David Zhang
December 11, 2012
Programming
450
7
Share
[Rails 开发入门课程] 第一节 Rails 运行环境
Rails 开发入门课程的第一节,主要介绍 Rails 运行环境。
介绍 Rails 处理 Web 请求的基本流程,以及部署 Rails 的基本步骤。
David Zhang
December 11, 2012
More Decks by David Zhang
See All by David Zhang
Implement Heap Sort in Erlang
daqing
0
890
[Rails 开发入门课程] 第五节 Controllers & Views
daqing
0
120
[Rails 开发入门课程] 第四节 Routes
daqing
0
230
[Rails 开发入门课程] 第三节 ActiveRecord Association
daqing
2
260
[Rails 开发入门课程] 第二节 Model
daqing
4
500
Other Decks in Programming
See All in Programming
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.2k
Oxcを導入して開発体験が向上した話
yug1224
4
250
Modding RubyKaigi for Myself
yui_knk
0
800
Migrations : C'est une question d'hygiène !
vinceamstoutz
0
2.5k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
11
3k
net-httpのHTTP/2対応について
naruse
0
350
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
6
1.3k
3Dシーンの圧縮
fadis
1
470
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
170
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
1.9k
今さら聞けないCancellationToken
htkym
0
200
AIとRubyの静的型付け
ukin0k0
0
450
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
850
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
390
Skip the Path - Find Your Career Trail
mkilby
1
130
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Agile that works and the tools we love
rasmusluckow
331
21k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Transcript
RAILS 开发⼊入⻔门课程 Introduction to Web development with Rails @daqing 12年12月12⽇日星期三
RAILS 开发⼊入⻔门课程 RAILS 运⾏行环境 Model Routes 第⼀一节 第⼆二节 第三节 第四节
Controllers & Views 第五节 ActiveRecord Association 第六节 Form API 12年12月12⽇日星期三
⺫⽬目标 理解 Rails 中的核⼼心概念 了解 Rails 项⺫⽬目的基本开发过程 可以开发简单的 Rails 应⽤用
12年12月12⽇日星期三
第⼀一节 RAILS 运⾏行环境 RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 12年12月12⽇日星期三
WEB 简介 浏览器 ⺴⽹网站 RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 12年12月12⽇日星期三
WEB 简介 浏览器 ⺴⽹网站 RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 HTTP
12年12月12⽇日星期三
WEB 简介 浏览器 ⺴⽹网站 HTML RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境
HTTP 12年12月12⽇日星期三
<!DOCTYPE html> <html> </html> <head> </head> <body> </body> <title> Welcome
<p>Hello, world! </p> </title> WEB 简介 RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 浏览器 ⺴⽹网站 HTML HTTP 12年12月12⽇日星期三
WEB 简介 RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 浏览器 ⺴⽹网站 HTML
HTTP 12年12月12⽇日星期三
什么是 WEB 开发? 12年12月12⽇日星期三
什么是 WEB 开发? 利⽤用编程语⾔言动态⽣生成 HTML ⽂文档 12年12月12⽇日星期三
什么是 WEB 开发? 利⽤用编程语⾔言动态⽣生成 HTML ⽂文档 Ruby 12年12月12⽇日星期三
什么是 WEB 开发? 利⽤用编程语⾔言动态⽣生成 HTML ⽂文档 Ruby on 12年12月12⽇日星期三
什么是 WEB 开发? 利⽤用编程语⾔言动态⽣生成 HTML ⽂文档 Ruby Rails on 12年12月12⽇日星期三
浏览器 Web Server App Server DB Rails HTTP 请求处理流程 RAILS
开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 API 12年12月12⽇日星期三
如何部署 RAILS 项⺫⽬目? 12年12月12⽇日星期三
浏览器 Web Server App Server DB Rails RAILS 开发⼊入⻔门课程 第⼀一节
RAILS 运⾏行环境 API 如何部署 RAILS 项⺫⽬目? 12年12月12⽇日星期三
浏览器 Web Server App Server DB Nginx Apache Lighttpd Rails
RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 API 如何部署 RAILS 项⺫⽬目? 12年12月12⽇日星期三
浏览器 Web Server App Server DB Nginx Apache Lighttpd Unicorn
Thin Puma Rails RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 API 如何部署 RAILS 项⺫⽬目? 12年12月12⽇日星期三
浏览器 Web Server App Server DB Nginx Apache Lighttpd Unicorn
Thin Puma Rails RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 MySQL Redis MongoDB API 如何部署 RAILS 项⺫⽬目? 12年12月12⽇日星期三
THE RAILS STACK RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 MySQL Ubuntu
Ruby Unicorn M y s q l 2 Rails Devise Haml RMagick 1 3 4 5 6 N g i n x 2 12年12月12⽇日星期三
RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 MySQL Ubuntu Ruby Unicorn M
y s q l 2 Rails Devise Haml RMagick 1 3 4 5 6 N g i n x 2 THE RAILS STACK 12年12月12⽇日星期三
RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 MySQL Ubuntu Ruby Unicorn M
y s q l 2 Rails Devise Haml RMagick 1 3 4 5 6 N g i n x 2 THE RAILS STACK 12年12月12⽇日星期三
RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 安装数据库 选择⾃自⼰己最熟悉的操作系统 安装 Ruby 安装
App Server 1 3 4 5 安装 Web Server 2 第⼀一步 配置运⾏行环境 如何部署 RAILS 项⺫⽬目? Ubuntu / CentOS / Gentoo sudo apt-get install nginx rvm install 1.9.3 gem install unicorn sudo apt-get install mysql-server-5.5 12年12月12⽇日星期三
RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 下载源代码 加载数据库结构 precompile assets 1
3 4 使⽤用 bundler 安装 Gem 2 第⼆二步 安装源代码 如何部署 RAILS 项⺫⽬目? git clone git://github.com/daqing/rabel.git bundle install rake db:setup rake assets:precompile 12年12月12⽇日星期三
RVM Ruby Version Manager 12年12月12⽇日星期三
RVM Ruby Version Manager 12年12月12⽇日星期三
RVM Ruby Version Manager 12年12月12⽇日星期三
RVM Ruby Version Manager 12年12月12⽇日星期三
RVM Ruby Version Manager 12年12月12⽇日星期三
RVM Ruby Version Manager 12年12月12⽇日星期三
什么是 GEM ? A gem is a packaged Ruby application
or library 打包好的 Ruby 共享代码库 12年12月12⽇日星期三
RUBYGEMS.ORG 集中式的 Gem 托管服务 $ gem sources $ gem search
-r rails $ gem install rails *** CURRENT SOURCES *** http://rubygems.org/ 12年12月12⽇日星期三
Rubygems 镜像 - 淘宝⺴⽹网 http://ruby.taobao.org 12年12月12⽇日星期三
QUESTIONS ? 12年12月12⽇日星期三
谢谢 RAILS 开发⼊入⻔门课程 第⼀一节 RAILS 运⾏行环境 (完) http://rabelapp.com https://github.com/daqing http://ruby-china.org/daqing
12年12月12⽇日星期三