Depends. If one looks at the spells as no more than a minor add-on to what the Ranger can already do (which is really all they should be), being able to only cast 2 or 3 a day starting at 9th level is just fine. But if you're looking for a nature-based class that can cast from Day 1 then you're after Druid or Nature Cleric; and if you're looking for a tougher class that can still cast from Day 1 then you're multi-classing said Druid or Nature Cleric with Fighter.
Lan-"the last Ranger I played was in 3e: a heavyweight plate-clad tank with the noble ethics of a Paladin who - though mechanically quite sub-optimal - lasted quite some time"-efan
But the 5th edition ranger does neither of those. The 5th edition ranger's magic is an augment to it weapons prowess and wilderness skill. Animal friensdhip buffs his Animal Handling skill. Hunter's mark buffs it's weapon damage.
Or thing of it this way. At level 5, a ranger's combat routine vs a giant elite might look like this.
Martial: Two weapon attacks; 1d8 damage the longsword, +1 AC from fighting style
Magic: 1d6 damage from
hunters mark, +10ft speed from
longstrider
Skill: 1d8 damage for Colossus slayer, Advantage to attack from attacking unseen vs Stealth.
Essentially, 1/3 of his or her power is tied up in magic. If you remove that, you have to double the martial or skill elements. Doing so put's you at direct open comparison with the fighter and rogue.
Fighter
Martial: Two attacks, 1d8 damage from longsword, +1 AC from fighting style, Two attack from Action Surge, Critical hit on a 19 or 20.
Rogue
Martial: 1d6 from shortsword, 3d6 bonus damage each round, resistance to one attack from Uncanny Dodge
Skill: Advantage to attack from attacking unseen vs Stealth, Double Stealth proficiency bonus, Critical hit on surprise round., +30ft speed from Cunning Action
Essentially you have to double two of the Ranger's attacks, speed or proficiency modifier just to remove magic and still have him keep up with the Fighter and Rogue. First question it's "What do I want the ranger to be?" The second and harder question is "How do I make that image not suck compared to the other classes?"