The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
The GC in Ruby 2.1: understand it, see it at work and tune it
I wrote a blog post about the GC in Ruby 2.1, in which I explain how the new GC works, how to read the output of GC.stat, what all those env variables for GC tuning are and how to use them.
Heroku dynos swap to disk before auto restart!
Memory used above quota will swap out to disk, which substantially degrades dyno performance. If the memory size of your dyno keeps growing until it reaches five times its quota (for a 1X dyno, 512MB x 5 = 2.5GB), the dyno manager will restart your dyno with an R15 error. [more inside]
Mock5 — stub remote APIs with Sinatra
I’ve made a new gem called Mock5 that allows to easily create remote API mocks using Sinatra and plug/unplug them at will. Using it, you can test all kind of situations, like API being down or taking too long to respond, responding successfully or with authentication error.
multi-timeout: kill a process and kill -9 if that does not work
We are using this for our crons since the unix timeout command does not support different kill signals [more inside]
Speed Up Your Rails Specs by 10x
One of the Ruby engineers at Originate posted a great article on how to get really fast rails tests by not loading all of rails. He also published the rails_spec_harness gem to make it easy to set up your spec helpers the way he describes in the article.
Stuff I deferred to get my first Rails + Angular app out the door
Since it’s my first Angular / Rails app there’s not much here for experts, but if you are considering doing one here are some things you might be able to put off until later but still get the job done.
Stunned by Sexism
I am a ruby engineer at heart. Those who know me usually see my posts about the ruby tools I have built on here. However today I am sharing a story about sexism that I think everyone should read. Let this be a reminder that as a Ruby community we need to be open and embrace everyone, including the companies we work for.
3 simple tips for Rails / Heroku startup
Three simple and useful advices that I gave to a friend that is new to Rails / Heroku.
Press release of RubyConf Taiwan 2014
RubyConf Taiwan, Taiwan’s biggest event for programming language Ruby will be held on the last weekend of April (April 25th and 26th) at National Yang-Ming University. According to Mu-Fan Teng(@ryudoawaru), organizer of this gathering, many important speakers and distinguished guests have been invited to the conference, known as the most internationalized grand event for programming language and its pursuers. Registration of this event will begin at 12:00 on March 10th. [more inside]
Hierarchical queries builder
I just launched activerecord-hierarchical_query which allows to create recursive queries to traverse trees with single SQL.
Reflecting on RubyMotion Experiences – Part 2
Next post in our Reflecting on RubyMotion Experiences series.
Getting Friendly with Fixtures
After spending so much time testing Rails with factories, I took a look at fixtures again and liked what I saw.
Learn Chef - it's hard but worth it
Having troubles learning Chef? I hope this will keep you motivated
Cucumber, Page-Object and Facebook
Please checkout Cucumber & Page-Object with Facebook home page. UI testing using BDD.
Looping with Fibers—Intercommunication between Ruby Fibers
I needed to loop over a fairly large data set and group it by year and month. In this post I walk through using two Ruby Fibers which communicate between each other in order to do in-loop grouping. The post begins with a brief introduction to Ruby Fibers.
Caching In Cells: API Change In 3.10.
Cells is a popular view component gem for Rails. The latest 3.10 release changes the API slightly - read the blog post for a discussion on cell caching and the changes.
New Starter Apps from Rails Composer
You can use Rails Composer, “the Rails generator on steroids,” to create any of the Rails 4.1 starter apps from the RailsApps project, including a new application that combines Devise and Pundit with Bootstrap or Foundation.
5 Advanced RubyMotionQuery Tips
There is more to Todd Werth’s RubyMotionQuery (RMQ) than you might realise, it’s filled with amazing tools to help you clean up your code and possibly do things you didn’t know were possible. In this episode I have 5 Advanced RMQ tips to expand your knowledge of RMQ. [more inside]
VPS Tutorial, CentOS, rbenv, rails, nginx, passenger
How to install VPS for rails development/production with CentOS, rbenv, ruby, rails, nginx, passenger
Public methods are your public API and be careful with what you include and inherit from others
When building APIs you should be careful with what you actually allow people to see since anything that’s out there could possibly be called by someone. Read more about it here.
Encode and decode Erlang and Elixir terms with Ruby
erlang-etf provides a pure Ruby version of term_to_binary and binary_to_term for communicating in Erlang’s External Term Format. Map from Erlang >= R17 and compressed binary support has been recently added.
Advanced Unit Measurement Conversion and Math with Unitwise
Unitwise is a Ruby library for unit conversion, measurement math, and really handy tool for performing scientific calculations. I have officially released it, and would appreciate any feedback before I move to v1.0.0.
Create an Interactive Console for Your Library With Pry
A neat way to use powerful tools to develop your RubyGems and have the library at your fingertips.
Two-part guide on Ruby CSV Library
SitePoint Ruby just put the 2nd part up here. If you want to learn about this library, these posts are great.