fixed error in dependency injection in ruby