Ruby on Rails code to repeat the experiment