ruby grains first solution