Rails is an MVC framework, PHP is a language. You might look into "Cake" for a proper comparison.
Rails will do anything you want it to do*. A lot of this comes from the rubygem ecosystem, most of which are usable without rails.
Out-of-the-box, with no other alterations, Rails provides really convenient places to describe your data (the models), figure out what data should be used to respond to requests (the controllers), and how to show that data as an HTML web page (the views).
*Except be faster than micro frameworks (sinatra, flask, ~ node)
I would not use rails to build something the size of Twitter or Facebook. I would definitely use Rails to build the first versions of Twitter and Facebook that hit the web.
I frequently refer to Rails as "a website in a can". As such, it is excellent for every example on your list, although it'd likely be overkill for a portfolio because you don't need the database.
Finally, if your problem is in any way a common one? If you are seeking to build a "normal" sort of website? If you think other people have solved the same problems you are trying to solve? Rails (plus gems) will do it for you, and keep you happy* while you do it.
I have an interview question: Build me a website with users who have avatar pictures. One guy literally did it one line of bash prompt, via the rails-composer tool.
Remember - There are basically two principles in RoR. One, from Ruby - "Maximize Developer Happiness", and one, from Rails - "Convention over Configuration". AKA, you will enjoy yourself, and frequently have to do nothing.