rubyinstances code for video