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


  1. 5 Random Ruby Tips Dr Khoo Chong Yee @CantabIP

  2. None
  3. 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)
  4. Bundle Console Start an irb session with all gems in

    Gemfile Great for gem development ! bundle console
  5. 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!
  6. Keep Ruby Notes in Evernote • Tag them “Random Ruby

    Tips” • Volunteer for the next talk!