SlideShare a Scribd company logo
1 of 22
Download to read offline
rails
        2010-11-27
rails

      Mac      ubuntu          windows

            windows


Mac                     iTerm+TextMate

ubuntu           Netbeans
windows                 rails

Windows

ruby1.8.7   gem1.3.7   rake0.8.7 rails3.03

mysql+Navica[mysql             ]

Mongrel

Netbeans7.0beta        6.8.9
ruby:rubyinstaller-1.8.7-p302.exe

mysql:mysql-essential-5.1.53-win32.msi

mysql           :navicat8_mysql_cs.exe

IDE     netbeans7.0Beta

others    TC e-editor cygwin
ruby rails
             ruby



ruby -v#                   ruby

gem -v#              gem          1.3.7

gem install rake rake,ruby            make

gem install rails#            rails          rdoc
mysql

 rails                   root


         mysql

          2007       libmySQL.dll
ruby1.8.7 bin

mysql
mysql
IDE        netbeans


netbeans6.8.9 rails3       7.0 Beta

                   JDK

        netbeans
cd

         rails        rails new anren -d=mysql

                        config/database.yml
mysql2   mysql             localhost 127.0.0.1

Mac       mysql2                    socket: /
tmp/mysql.sock
web



Gemfile     gem ‘mongrel’

 bundle install
Rake


rake db:create

rake db:migrate

    ...
g

rails g controllers sayhello

rails g controllers info home stroy brand jobs
contact

rails g scaffold Post title:string content:tex t
#      Post
MVC
M:
                               (Post)
(Product)        (Info)                 Post
         title   content

C                          M               M


V       C                  C
MVC
                 M[

             ]        C[

             ]        V[        ]

                 rout[      ]
c[               action]   v[
     ]   m          c v
app       mvc


helpers
      v         v


mailers
config                                 web

db

doc

lib

log

public                        index.html
stylesheets   css   javascripts       js
images
CRUD
CRUD:create,read,update,destroy


      rails      restful       action

create create

reader                     index                 show

update: update

destroy: destroy

                   new      create      edit(   update)
blueprintcss http://www.blueprintcss.org/

bp                     24
           <div id="container"><div
class=”span-3”>...</div><div class=”span-21
last”>...</div></div>

bp                readme
<%= javascript_include_tag :defaults %>

<%= stylesheet_link_tag "blueprint/screen"
%>
erb



link_to "link text...", :controller =>
"items", :action => "index"
标题




页
闻




联   们




        权
RailsTextMateCheats.pdf

More Related Content

What's hot

1 serializando y deserializando datos en red
1  serializando y deserializando datos en red1  serializando y deserializando datos en red
1 serializando y deserializando datos en red
Jesús Estévez
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
Amit Thakkar
 

What's hot (20)

MySql cheat sheet
MySql cheat sheetMySql cheat sheet
MySql cheat sheet
 
Automating Front-End Workflow
Automating Front-End WorkflowAutomating Front-End Workflow
Automating Front-End Workflow
 
Future of NodeJS
Future of NodeJSFuture of NodeJS
Future of NodeJS
 
Redis fundamental
Redis fundamentalRedis fundamental
Redis fundamental
 
Meteor presentation
Meteor presentationMeteor presentation
Meteor presentation
 
Create a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDBCreate a RESTful API with NodeJS, Express and MongoDB
Create a RESTful API with NodeJS, Express and MongoDB
 
Deploying Percona XtraDB Cluster in Openshift
Deploying Percona XtraDB Cluster in OpenshiftDeploying Percona XtraDB Cluster in Openshift
Deploying Percona XtraDB Cluster in Openshift
 
1 serializando y deserializando datos en red
1  serializando y deserializando datos en red1  serializando y deserializando datos en red
1 serializando y deserializando datos en red
 
Mongodb
MongodbMongodb
Mongodb
 
Create a module bundler from scratch
Create a module bundler from scratchCreate a module bundler from scratch
Create a module bundler from scratch
 
Nodejs
NodejsNodejs
Nodejs
 
Workers
WorkersWorkers
Workers
 
Java script at backend nodejs
Java script at backend   nodejsJava script at backend   nodejs
Java script at backend nodejs
 
Node.js
Node.jsNode.js
Node.js
 
Lw 4.1
Lw 4.1Lw 4.1
Lw 4.1
 
Band criando api nodejs com type script
Band   criando api nodejs com type scriptBand   criando api nodejs com type script
Band criando api nodejs com type script
 
Using MongoDB
Using MongoDBUsing MongoDB
Using MongoDB
 
Passwordless login with unix auth_socket
Passwordless login with unix auth_socketPasswordless login with unix auth_socket
Passwordless login with unix auth_socket
 
Html5 websockets
Html5 websocketsHtml5 websockets
Html5 websockets
 
Visual Programming Framework for Unity - UniFlow のご紹介
Visual Programming Framework for Unity - UniFlow のご紹介Visual Programming Framework for Unity - UniFlow のご紹介
Visual Programming Framework for Unity - UniFlow のご紹介
 

Similar to Rails入门培训

Dnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforussoDnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforusso
DotNetCampus
 
Thu 1500 lacoul_shamod_color
Thu 1500 lacoul_shamod_colorThu 1500 lacoul_shamod_color
Thu 1500 lacoul_shamod_color
DATAVERSITY
 
Intro to MVC 3 for Government Developers
Intro to MVC 3 for Government DevelopersIntro to MVC 3 for Government Developers
Intro to MVC 3 for Government Developers
Frank La Vigne
 

Similar to Rails入门培训 (20)

Node js
Node jsNode js
Node js
 
JS Single-Page Web App Essentials
JS Single-Page Web App EssentialsJS Single-Page Web App Essentials
JS Single-Page Web App Essentials
 
Building performance auf der Developer Conference Hamburg
Building performance auf der Developer Conference HamburgBuilding performance auf der Developer Conference Hamburg
Building performance auf der Developer Conference Hamburg
 
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURE
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURESVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURE
SVILUPPARE E GESTIRE ARCHITETTURE A MICROSERVIZI SU AZURE
 
Dnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforussoDnc2015 azure-microservizi-vforusso
Dnc2015 azure-microservizi-vforusso
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Modular Web Applications With Netzke
Modular Web Applications With NetzkeModular Web Applications With Netzke
Modular Web Applications With Netzke
 
Connect + Docker + AWS = Bitbucket Pipelines
Connect + Docker + AWS = Bitbucket PipelinesConnect + Docker + AWS = Bitbucket Pipelines
Connect + Docker + AWS = Bitbucket Pipelines
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
 
Node.js + NoSQL
Node.js + NoSQLNode.js + NoSQL
Node.js + NoSQL
 
Rails + Sencha = Netzke
Rails + Sencha = NetzkeRails + Sencha = Netzke
Rails + Sencha = Netzke
 
Thu 1500 lacoul_shamod_color
Thu 1500 lacoul_shamod_colorThu 1500 lacoul_shamod_color
Thu 1500 lacoul_shamod_color
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
 
JS & NodeJS - An Introduction
JS & NodeJS - An IntroductionJS & NodeJS - An Introduction
JS & NodeJS - An Introduction
 
Deploying configurable frontend web application containers
Deploying configurable frontend web application containersDeploying configurable frontend web application containers
Deploying configurable frontend web application containers
 
Intro to MVC 3 for Government Developers
Intro to MVC 3 for Government DevelopersIntro to MVC 3 for Government Developers
Intro to MVC 3 for Government Developers
 
Real World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS ApplicationReal World Lessons on the Pain Points of Node.JS Application
Real World Lessons on the Pain Points of Node.JS Application
 
Minimalism in Web Development
Minimalism in Web DevelopmentMinimalism in Web Development
Minimalism in Web Development
 
Rails web api 开发
Rails web api 开发Rails web api 开发
Rails web api 开发
 
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + KubernetesMongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
 

More from ouyangzhiping (11)

为你的身体与家编程
为你的身体与家编程为你的身体与家编程
为你的身体与家编程
 
Rhome开源家居计划
Rhome开源家居计划Rhome开源家居计划
Rhome开源家居计划
 
脑训练与心理战
脑训练与心理战脑训练与心理战
脑训练与心理战
 
Mac入门培训
Mac入门培训Mac入门培训
Mac入门培训
 
Happy ruby day01:为什么是Ruby?
Happy ruby day01:为什么是Ruby?Happy ruby day01:为什么是Ruby?
Happy ruby day01:为什么是Ruby?
 
微博的道与术
微博的道与术微博的道与术
微博的道与术
 
产品设计的本质是什么
产品设计的本质是什么产品设计的本质是什么
产品设计的本质是什么
 
社会网络理论与sns网站
社会网络理论与sns网站社会网络理论与sns网站
社会网络理论与sns网站
 
社会网络分析在社会心理学中的应用
社会网络分析在社会心理学中的应用社会网络分析在社会心理学中的应用
社会网络分析在社会心理学中的应用
 
知行合一:积极心理学分享
知行合一:积极心理学分享知行合一:积极心理学分享
知行合一:积极心理学分享
 
中国人的婚恋行为
中国人的婚恋行为中国人的婚恋行为
中国人的婚恋行为
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

Rails入门培训