Ruby/Rails Tools Ruby Fools 2008 - Copenhagen About Me Cloves - - PowerPoint PPT Presentation

ruby rails tools
SMART_READER_LITE
LIVE PREVIEW

Ruby/Rails Tools Ruby Fools 2008 - Copenhagen About Me Cloves - - PowerPoint PPT Presentation

Ruby/Rails Tools Ruby Fools 2008 - Copenhagen About Me Cloves Carneiro Jr. ccjr@spinbits.com My Book Beginning Rails From Novice to Professional Tools that matter Why do tools matter What tools should I use? Productivity


slide-1
SLIDE 1

Ruby/Rails Tools

Ruby Fools 2008 - Copenhagen

slide-2
SLIDE 2

About Me

Cloves Carneiro Jr.

ccjr@spinbits.com

slide-3
SLIDE 3

My Book

Beginning Rails From Novice to Professional

slide-4
SLIDE 4

Tools that matter

  • Why do tools matter
  • What tools should I use?
  • Productivity Boost
slide-5
SLIDE 5

Contents

  • Subversion
  • Editors/IDE
  • Testing
  • Rake
  • Deployment
  • Terminal/irb/console
slide-6
SLIDE 6

Subversion

  • Source Code Control
  • Access to all versions
  • Easily rollback bad design decisions

➡ http://subversion.trigis.org

  • Subversion Hooks
  • Continuous Integration
  • Diff emails in your Inbox
slide-7
SLIDE 7

SVN Diffs in your Inbox

  • What is it?
  • What do I get?
slide-8
SLIDE 8

Continuous Integration

  • What is it?
  • When does it run?
  • How does it help?
slide-9
SLIDE 9

CI Tools

  • Rails plugin

➡ ./script/plugin install continuous_builder

  • Cerberus

➡ http://cerberus.rubyforge.org

  • Cruise Control

➡ http://cruisecontrolrb.thoughtworks.com

slide-10
SLIDE 10

Text Editor / IDE

  • Know one editor very well
  • Syntax coloring
  • Auto completion
  • Project/File Browser
slide-11
SLIDE 11

Ruby/Rails IDEs

  • RadRails

➡ http://www.aptana.com/rails/

  • NetBeans

➡ http://www.netbeans.org/features/ruby/

  • Others ..
slide-12
SLIDE 12

TextMate

➡ http://macromates.com

  • Bundles
  • Ruby
  • Rails
  • Quick navigation
slide-13
SLIDE 13

TextMate Ruby Bundle

  • Smart Auto-complete
  • Run Ruby code from the editor
  • Code Snippets
slide-14
SLIDE 14

TextMate Rails Bundle

  • Smart Auto-complete
  • Move from View to Controller to Test
  • Rails practices
slide-15
SLIDE 15

Rake

  • What is it?
  • How it helps?
slide-16
SLIDE 16

Rake for Rails

  • test:units/functionals/integration/uncommited
  • db:fixtures/migrate/schema/sessions
  • rails:freeze/unfreeze/update
  • doc:app/plugins/rails
  • stats
  • log:clear
slide-17
SLIDE 17

Test

  • Code coverage
  • Rcov
  • Autotest(ZenTest)
  • Growl notifier
  • RedGreen
slide-18
SLIDE 18

Rcov

  • What is it?
  • How does it look?

➡ gem install rcov

slide-19
SLIDE 19

ZenTest/Autotest

  • How does it help me?

➡ gem install ZenTest

  • Add ons
  • Growl notifier
  • RedGreen
slide-20
SLIDE 20

Deployment

  • The need
  • Capistrano
  • Vlad The Deployer
slide-21
SLIDE 21

Capistrano

  • How to install?

➡ gem install capistrano

  • Recipes all over the net
slide-22
SLIDE 22

Vlad The Deployer

  • How to install?

➡ gem install vlad

  • Rake based
  • rake vlad:deploy
slide-23
SLIDE 23

deploy.rb

set :domain, "server.com" set :deploy_to, "/usr/local/rails/fu" set :repository, "svn://server.com/apps/fu" namespace :vlad do task :deploy => ['vlad:update', 'vlad:symlink', 'vlad:migrate', 'vlad:restart_mongrel'] desc 'Restarts mongrel cluster' remote_task :restart_mongrel, :roles => :app do run "cd #{current_path} && sudo mongrel_rails cluster::stop && mongrel_rails cluster::start" end end

slide-24
SLIDE 24

Terminal/irb/console

  • Interactive shell
  • Interact with Ruby/Rails code on the spot
  • irb comes with Ruby
  • script/console comes with Rails
slide-25
SLIDE 25

Finding tools

  • How much time to invest?
  • When to stop searching?
slide-26
SLIDE 26

Summary

  • Rails is simple
  • Rails is powerful
  • Rails is comprehensive
  • Have fun
slide-27
SLIDE 27

Thank you