When in doubt, use your nose. That's how you'll know if pineapples, peaches and other fruits are ripe.
Secret Tips from the Yumiverse illustrated a cheat sheet for knowing when a fruit is ripe or not and says both smell and weight can clue you in on when to eat or buy them:
For many summer fruits, smell is a good indicator of their ripeness. For peaches, pineapples, cantaloupes, and mangoes, their stem ends should smell sweet like how they should taste. For most fruits, they should feel heavy relative to their weight, which is a good indicator of their inner juiciness.
Head to the Yumiverse to check out the cheat sheet.
How to Tell If It's Ripe or Not: The Ultimate Cheat Sheet for Tricky Fruits [Secrets from the Yumiverse]