Implement remove and dependencies setting in Ruby