$30 off During Our Annual Pro Sale. View Details »

Improve Your Rails Development Workflow

Improve Your Rails Development Workflow

Florent Guilleux

March 26, 2011
Tweet

More Decks by Florent Guilleux

Other Decks in Programming

Transcript

  1. Improve Your Rails
    Development Workflow
    Ruby Peru meeting - March 26, 2011
    Florent Guilleux

    View Slide

  2. Disclaimer: mastering your
    editor and shell are probably
    the most important things to
    do to improve your workflow
    But let's concentrate on tools for
    today...

    View Slide

  3. 1. Speed-up application initial
    setup with a Rails application
    template

    View Slide

  4. 2. Automate the launch of
    commands needed for your
    application with Terminitor

    View Slide

  5. config file example for a Rails project
    window do
    before do run "cd ~/projects/demo" end
    run "git st"
    run "mate ."
    tab :name => "server" do run "rails server" end
    tab :name => "console" do run "rails console" end
    tab :name => "spork" do run "bundle exec spork" end
    tab :name => "autotest" do run "bundle exec autotest"
    end
    end

    View Slide

  6. 3. Make your application 10
    times faster in development
    mode with
    RailsDevelopmentBoost

    View Slide

  7. 4. Automatically refresh your
    browser when a file has
    changed with AutoRefresh

    View Slide

  8. 5. Improve your rails console
    with Hirb and Wirble

    View Slide

  9. >> Post.all
    Post Load (0.7ms) SELECT "posts".* FROM "posts"
    +-----+-------------------------+----------+
    | id | created_at | title |
    +-----+-------------------------+----------+
    | 907 | 2009-03-06 21:10:41 UTC | hello |
    | 906 | 2009-03-06 08:47:04 UTC | world |
    +-----+-------------------------+----------+
    2 rows in set

    View Slide

  10. 6. Easily know the
    attributes/columns of your
    models with Annotate

    View Slide

  11. class LineItem < ActiveRecord::Base
    belongs_to :product
    # ...
    end
    # == Schema Info
    #
    # Table name: line_items
    #
    # id :integer(11) not null, primary key
    # quantity :integer(11) not null
    # product_id :integer(11) not null
    # unit_price :float
    # order_id :integer(11)
    example of model annotation

    View Slide

  12. 7. Generate diagrams of a
    Rails application with Rails
    ERD or RailRoady

    View Slide

  13. View Slide

  14. 8. Open gem code quickly
    with qwandry

    View Slide

  15. View Slide