SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
My Rails Way
  Ruby on Rails




         1
Who am I

• I’m
• Master: Ruby & Ruby on Rails
• Company: PIXNET
• Site: http://belovely.tw/
• Blog: http://wildjcrt.pixnet.net/
                       2
Agenda


• Introduction Ruby on Rails
• Rails training course

                  3
Introduction
Ruby on Rails


     4
Ruby
•                                     Matz
•       Perl 6             pearl
    Ruby 7              ruby
* http://www.ruby-lang.org/en/
* http://www.ruby-lang.org/zh_TW/ (   )
* http://ruby.tw/ ( )
                    5
Ruby on Rails (1)

• David Heinemeier Hanson (37signals)
• Yehuda Katz (Engine Yard)
* http://rubyonrails.org/
* http://www.rubyonrails.org.tw/ ( )

                    6
Ruby on Rails (2)
• A web framework for Ruby
• MVC architecture
• Agile software development
 - Don't Repeat Yourself
 - Convention over Configuration

                   7
Website using Rails
• BeLovely
• Techbang
• Twitter
• Github
• Yellow Pages
• Basecamp
• ......more     8
Regular learning roadmap




                http://techiferous.com/2010/07/
                roadmap-for-learning-rails/
           9
So...

It takes a significant
investment of time to
learn Rails.

           10
In fact,


we already have a great
training course to enter Rails.


              11
Rails training course



         12
2010 Ruby on Rails
                                      Rails 2
• http://blog.xdite.net/?p=1754
 - http://blog.xdite.net/?p=1807
 - http://wildjcrt.pixnet.net/blog/post/
     26624950
       ‣ pw: cite-on-rails
*   This training course designs by xdite.

                     13
Course purpose

• Basic knowledge
• Useful services
• Bottleneck

                    14
Course 0: Git
• Open a project in github.
• Practice git useful commands.
 - pull, push, commit, branch, add, checkout,
    merge, status, diff, grep
* Peepcode Git Pro Git
* http://wildjcrt.pixnet.net/blog/post/
  26458848

                       15
Course 0: Editor
•   vgod                         Vim


    -   http://blog.vgod.tw/2009/12/08/vim-cheat-
        sheet-for-programmers/
* http://c9s.blogspot.com/2009/08/vim-hacks-
    coscup.html
* Oreilly            vi    vim
* Pragmatic       TextMate: Power Editing for the Mac

                           16
Course 0: Linux CLI


• Peepcode   Meet the Command Line
  Advanced Command Line




                  17
Reference before course
*   http://rails.pixnet.net/blog/category/list/1603567
*   http://wildjcrt.pixnet.net/blog/category/list/1431631
*   Ruby Programming —         Ruby
*   Ruby for Rails - Rails                  Ruby
*   The Well-Grounded Rubyist
*                Rails
*   Agile Web Development with Rails, Third Edition
*   The Rails Way
*   Ruby Pocket Reference
*   Rails Recipes
*   Advanced Rails Recipes: 84 New Ways to Build Stunning Rails Apps


                                       18
Course 1 (1)

• Create a new rails project.
• Setup configuration.
 - database.yml
 - .gitignore
• Push to github.
* http://rails.pixnet.net/blog/post/22953827
                      19
Course 1 (2)
• Complete a basic forum.
  - Forum model CRUD (scaffold)
  - Post model CRUD (scaffold)
  - Setting routes in this format :
     http://example.org/forums/1/posts/2
* http://rails.pixnet.net/blog/post/22956704
* http://ihower.tw/training/rails-tutoral.html
                       20
Course 2
• User can login / logout / signup.
 - Guest can view all posts.
 - Post needs to login forum.
 - User can only edit and destroy his own
    posts.
• http://github.com/technoweenie/restful-
  authentication plugin   DRY!


                     21
Course 3
•   Forum posts order and paginate.
    -   params, pagination
    -   counter_cache
    -   named_scope :recent
•   http://github.com/mislav/will_paginate plugin
*   http://railscasts.com/episodes/23-counter-cache-
    column
*   http://railscasts.com/episodes/108-named-scope

                             22
Course 4

• Attachment files
 - PostAttachment model
 - form_for, multipart
• http://github.com/thoughtbot/paperclip plugin
• http://github.com/technoweenie/
  attachment_fu plugin

                     23
Course 5
• Forum can manage admin accounts.
• Build backstage.
 - route : namespace
 - before_filter :require_is_admin
* http://railstips.org/blog/archives/2007/04/28/
  namespaces-added-to-routes/

                      24
Course 6
•   Rake
    -   create seed data
    -   create fake data
•   http://github.com/ryanb/populator plugin
*   http://railsenvy.com/2007/6/11/ruby-on-rails-rake-
    tutorial
*   http://ryandaigle.com/articles/2009/5/13/what-s-
    new-in-edge-rails-database-seeding

                           25
Course 7 (1)
• Installing Ruby on Rails environment in a
  pure OS (recommend Debian / Ubuntu).
  -   Ruby Enterprise Edition
  -   MySQL
  -   Apache / nginx
  -   Passenger
  -   Capistrano

                       26
Course 7 (2)
• Deploy the practice project.
 - Setup deploy.rb.
 - Create an account for deploy.
 - Setup ssh.
 - Setup database, run migration.
 - Setup virtual host.
                    27
Course 7 (3)

* http://wildjcrt.pixnet.net/blog/post/
  26624950
* http://blog.xdite.net/?p=1807
* AWDR3 deploy
* Ruby Pocket Reference capistrano

                      28
Another Rails Training( )

                           Ruby on Rails
 Ruby on Rails
 http://ihower.tw/        http://ihower.tw/
 rails2/                  rails3/

                           *designed by ihower
                          http://ihower.tw/blog/

                     29
Related Link
•               Ruby on Rails? 2009
    -   http://rails.pixnet.net/blog/post/27997778
•               Ruby on Rails        2009
    -   http://rails.pixnet.net/blog/post/27997784
•   Rails
    -   http://wildjcrt.pixnet.net/blog/post/26624950
•                 Rails
    -   http://wildjcrt.pixnet.net/blog/post/27037216

                                30
Q &A



 31

Más contenido relacionado

Similar a My rails way

Rails入門與新人實戰經驗分享
Rails入門與新人實戰經驗分享Rails入門與新人實戰經驗分享
Rails入門與新人實戰經驗分享wildjcrt
 
Contributing to rails
Contributing to railsContributing to rails
Contributing to railsLukas Eppler
 
JRuby, Ruby, Rails and You on the Cloud
JRuby, Ruby, Rails and You on the CloudJRuby, Ruby, Rails and You on the Cloud
JRuby, Ruby, Rails and You on the CloudHiro Asari
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with RailsYi-Ting Cheng
 
[.Net开发交流会][2010.06.19]better framework better life(吕国宁)
[.Net开发交流会][2010.06.19]better framework better life(吕国宁)[.Net开发交流会][2010.06.19]better framework better life(吕国宁)
[.Net开发交流会][2010.06.19]better framework better life(吕国宁)Shanda innovation institute
 
Better Framework Better Life
Better Framework Better LifeBetter Framework Better Life
Better Framework Better Lifejeffz
 
Rails - getting started
Rails - getting startedRails - getting started
Rails - getting startedTrue North
 
"Wix Serverless from inside", Mykola Borozdin
"Wix Serverless from inside", Mykola Borozdin"Wix Serverless from inside", Mykola Borozdin
"Wix Serverless from inside", Mykola BorozdinFwdays
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemYi-Ting Cheng
 
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스Rhio Kim
 
Better framework, better life
Better framework, better lifeBetter framework, better life
Better framework, better lifeDaniel Lv
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Nilesh Panchal
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGuillaume Laforge
 
Vivendo No Mundo Rails
Vivendo No Mundo RailsVivendo No Mundo Rails
Vivendo No Mundo RailsAlisson Sales
 
Vue.js + Vuexチーム開発実践の事例
Vue.js + Vuexチーム開発実践の事例Vue.js + Vuexチーム開発実践の事例
Vue.js + Vuexチーム開発実践の事例treby
 
Security Goodness with Ruby on Rails
Security Goodness with Ruby on RailsSecurity Goodness with Ruby on Rails
Security Goodness with Ruby on RailsSource Conference
 

Similar a My rails way (20)

Rails入門與新人實戰經驗分享
Rails入門與新人實戰經驗分享Rails入門與新人實戰經驗分享
Rails入門與新人實戰經驗分享
 
Contributing to rails
Contributing to railsContributing to rails
Contributing to rails
 
JRuby, Ruby, Rails and You on the Cloud
JRuby, Ruby, Rails and You on the CloudJRuby, Ruby, Rails and You on the Cloud
JRuby, Ruby, Rails and You on the Cloud
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
Redis
RedisRedis
Redis
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with Rails
 
What's new in RubyGems3
What's new in RubyGems3What's new in RubyGems3
What's new in RubyGems3
 
Rails on windows
Rails on windowsRails on windows
Rails on windows
 
[.Net开发交流会][2010.06.19]better framework better life(吕国宁)
[.Net开发交流会][2010.06.19]better framework better life(吕国宁)[.Net开发交流会][2010.06.19]better framework better life(吕国宁)
[.Net开发交流会][2010.06.19]better framework better life(吕国宁)
 
Better Framework Better Life
Better Framework Better LifeBetter Framework Better Life
Better Framework Better Life
 
Rails - getting started
Rails - getting startedRails - getting started
Rails - getting started
 
"Wix Serverless from inside", Mykola Borozdin
"Wix Serverless from inside", Mykola Borozdin"Wix Serverless from inside", Mykola Borozdin
"Wix Serverless from inside", Mykola Borozdin
 
Ship It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails EcosystemShip It ! with Ruby/ Rails Ecosystem
Ship It ! with Ruby/ Rails Ecosystem
 
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
 
Better framework, better life
Better framework, better lifeBetter framework, better life
Better framework, better life
 
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
Ruby on-rails-101-presentation-slides-for-a-five-day-introductory-course-1194...
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Vivendo No Mundo Rails
Vivendo No Mundo RailsVivendo No Mundo Rails
Vivendo No Mundo Rails
 
Vue.js + Vuexチーム開発実践の事例
Vue.js + Vuexチーム開発実践の事例Vue.js + Vuexチーム開発実践の事例
Vue.js + Vuexチーム開発実践の事例
 
Security Goodness with Ruby on Rails
Security Goodness with Ruby on RailsSecurity Goodness with Ruby on Rails
Security Goodness with Ruby on Rails
 

Último

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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.pdfsudhanshuwaghmare1
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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...Drew Madelung
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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 2024Rafal Los
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 

Último (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

My rails way

  • 1. My Rails Way Ruby on Rails 1
  • 2. Who am I • I’m • Master: Ruby & Ruby on Rails • Company: PIXNET • Site: http://belovely.tw/ • Blog: http://wildjcrt.pixnet.net/ 2
  • 3. Agenda • Introduction Ruby on Rails • Rails training course 3
  • 5. Ruby • Matz • Perl 6 pearl Ruby 7 ruby * http://www.ruby-lang.org/en/ * http://www.ruby-lang.org/zh_TW/ ( ) * http://ruby.tw/ ( ) 5
  • 6. Ruby on Rails (1) • David Heinemeier Hanson (37signals) • Yehuda Katz (Engine Yard) * http://rubyonrails.org/ * http://www.rubyonrails.org.tw/ ( ) 6
  • 7. Ruby on Rails (2) • A web framework for Ruby • MVC architecture • Agile software development - Don't Repeat Yourself - Convention over Configuration 7
  • 8. Website using Rails • BeLovely • Techbang • Twitter • Github • Yellow Pages • Basecamp • ......more 8
  • 9. Regular learning roadmap http://techiferous.com/2010/07/ roadmap-for-learning-rails/ 9
  • 10. So... It takes a significant investment of time to learn Rails. 10
  • 11. In fact, we already have a great training course to enter Rails. 11
  • 13. 2010 Ruby on Rails Rails 2 • http://blog.xdite.net/?p=1754 - http://blog.xdite.net/?p=1807 - http://wildjcrt.pixnet.net/blog/post/ 26624950 ‣ pw: cite-on-rails * This training course designs by xdite. 13
  • 14. Course purpose • Basic knowledge • Useful services • Bottleneck 14
  • 15. Course 0: Git • Open a project in github. • Practice git useful commands. - pull, push, commit, branch, add, checkout, merge, status, diff, grep * Peepcode Git Pro Git * http://wildjcrt.pixnet.net/blog/post/ 26458848 15
  • 16. Course 0: Editor • vgod Vim - http://blog.vgod.tw/2009/12/08/vim-cheat- sheet-for-programmers/ * http://c9s.blogspot.com/2009/08/vim-hacks- coscup.html * Oreilly vi vim * Pragmatic TextMate: Power Editing for the Mac 16
  • 17. Course 0: Linux CLI • Peepcode Meet the Command Line Advanced Command Line 17
  • 18. Reference before course * http://rails.pixnet.net/blog/category/list/1603567 * http://wildjcrt.pixnet.net/blog/category/list/1431631 * Ruby Programming — Ruby * Ruby for Rails - Rails Ruby * The Well-Grounded Rubyist * Rails * Agile Web Development with Rails, Third Edition * The Rails Way * Ruby Pocket Reference * Rails Recipes * Advanced Rails Recipes: 84 New Ways to Build Stunning Rails Apps 18
  • 19. Course 1 (1) • Create a new rails project. • Setup configuration. - database.yml - .gitignore • Push to github. * http://rails.pixnet.net/blog/post/22953827 19
  • 20. Course 1 (2) • Complete a basic forum. - Forum model CRUD (scaffold) - Post model CRUD (scaffold) - Setting routes in this format : http://example.org/forums/1/posts/2 * http://rails.pixnet.net/blog/post/22956704 * http://ihower.tw/training/rails-tutoral.html 20
  • 21. Course 2 • User can login / logout / signup. - Guest can view all posts. - Post needs to login forum. - User can only edit and destroy his own posts. • http://github.com/technoweenie/restful- authentication plugin DRY! 21
  • 22. Course 3 • Forum posts order and paginate. - params, pagination - counter_cache - named_scope :recent • http://github.com/mislav/will_paginate plugin * http://railscasts.com/episodes/23-counter-cache- column * http://railscasts.com/episodes/108-named-scope 22
  • 23. Course 4 • Attachment files - PostAttachment model - form_for, multipart • http://github.com/thoughtbot/paperclip plugin • http://github.com/technoweenie/ attachment_fu plugin 23
  • 24. Course 5 • Forum can manage admin accounts. • Build backstage. - route : namespace - before_filter :require_is_admin * http://railstips.org/blog/archives/2007/04/28/ namespaces-added-to-routes/ 24
  • 25. Course 6 • Rake - create seed data - create fake data • http://github.com/ryanb/populator plugin * http://railsenvy.com/2007/6/11/ruby-on-rails-rake- tutorial * http://ryandaigle.com/articles/2009/5/13/what-s- new-in-edge-rails-database-seeding 25
  • 26. Course 7 (1) • Installing Ruby on Rails environment in a pure OS (recommend Debian / Ubuntu). - Ruby Enterprise Edition - MySQL - Apache / nginx - Passenger - Capistrano 26
  • 27. Course 7 (2) • Deploy the practice project. - Setup deploy.rb. - Create an account for deploy. - Setup ssh. - Setup database, run migration. - Setup virtual host. 27
  • 28. Course 7 (3) * http://wildjcrt.pixnet.net/blog/post/ 26624950 * http://blog.xdite.net/?p=1807 * AWDR3 deploy * Ruby Pocket Reference capistrano 28
  • 29. Another Rails Training( ) Ruby on Rails Ruby on Rails http://ihower.tw/ http://ihower.tw/ rails2/ rails3/ *designed by ihower http://ihower.tw/blog/ 29
  • 30. Related Link • Ruby on Rails? 2009 - http://rails.pixnet.net/blog/post/27997778 • Ruby on Rails 2009 - http://rails.pixnet.net/blog/post/27997784 • Rails - http://wildjcrt.pixnet.net/blog/post/26624950 • Rails - http://wildjcrt.pixnet.net/blog/post/27037216 30

Notas del editor