Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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
  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...
  3. 1. Speed-up application initial setup with a Rails application template

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

    with Terminitor
  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
  6. 3. Make your application 10 times faster in development mode

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

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

  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
  10. 6. Easily know the attributes/columns of your models with Annotate

  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
  12. 7. Generate diagrams of a Rails application with Rails ERD

    or RailRoady
  13. None
  14. 8. Open gem code quickly with qwandry

  15. None