As a real estate agent, I'm biased, but I see real estate a better investment than the stock market because you can have more control of the investment. Stocks, you just sit and wait and hope. In Real Estate, you can improve the property to increase rents.
Don't know that there is a right or wrong answer as long as one remains diversified.
Problem with real estate is liquidity. Expense of sales transaction (for non-realtors), risk of unanticipated depreciation, damage and upkeep are other negatives. Tax deductible levered purchase is a positive.
For folks more comfortable dealing with stocks, REITs are a good alternative.
But hopefully no one here is proposing a general investor be 100% stocks or 100% real estate.