Prevent whitespace in gem declarations and provide clear error messaging.