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

5 Random Ruby Tips

5 Random Ruby Tips

A selection of tips and tricks for working with the Ruby programming language, as presented at the November 2013 meeting of the Singapore Ruby Group.

Copyright 2013 Chong-Yee Khoo. All rights reserved.

Dr Chong-Yee Khoo

November 19, 2013
Tweet

More Decks by Dr Chong-Yee Khoo

Other Decks in Programming

Transcript

  1. Bundler 1.4.0 Parallel Installs gem install bundler --pre bundle install

    -j4 ! http://tinyurl.com/parallel-bundler (Sikachu blog) http://tinyurl.com/heroku-bundler (Heroku buildpack)
  2. Bundle Console Start an irb session with all gems in

    Gemfile Great for gem development ! bundle console
  3. Tweak Ruby GC Settings • http://tinyurl.com/ruby-gc (Fred Wu blog) •

    Set environment variables, e.g., in .zshrc • RUBY_GC_MALLOC_LIMIT • RUBY_HEAP_MIN_SLOTS • RUBY_FREE_MIN • 4064 examples • before 2m 24.5s • after 1m 22.58s • 42.8% faster!
  4. Keep Ruby Notes in Evernote • Tag them “Random Ruby

    Tips” • Volunteer for the next talk!