Hi, I want to know what language is better. Particularly for online text-based games. Is there any language witch is better to use for this kind of projects? I am not an expert in PHP, but i can PHP (very) well. I have no experience with RoR now.
I use Rails for bigger projects, Camping for smaller stuff & PHP for one page things that I don't want to worry about deploying. Bear in-mind that Rails deployment can be quite a pain for newbies, especially on shared hosts using fastcgi - if you need to get the project done quickly the choice is obvious. I can't say what's better for your project, but if you've got some spare time I'd recommend giving Rails a shot - Ruby really is a joy to work with.
Yes, Ruby is slower than PHP. This isn't really an issue until you're getting lots and lots of traffic, i.e., hundreds of requests per-second - providing your code doesn't suck if you are getting that kind-of traffic, until a better ruby implementation comes around the plan is to throw more hardware at the problem. There's quite a few people working on faster VMs and Rails performance so hopefully this will change in the future, until then, I wouldn't worry about it too much unless you're rewriting eBay.
That's OK. The hardware isn't really an issue for me. Does Ruby has the same functions like rand() and calculations etc.?
Yes, it does. Try ruby online, http://tryruby.hobix.com/ & http://www.ruby-lang.org/en/ for more ruby information.
by the time a ruby and rails app needs to worry about being slow, congrats your site is already worth plenty of money. ive read twitter.com uses ruby and at its heaviest time, is having rough time handling 11k requests a second. that is a boatload of hits. http://www.radicalbehavior.com/5-question-interview-with-twitter-developer-alex-payne/
I know a lot of people who swear by ruby. I have to say that, just comparing the languages, it seems to me that ruby is a lot more powerful (and better designed) than PHP. That's not counting the rails part at all. Someday I really need to play with RoR to see what all the fuss is about. Every time I start, I get distracted by Ruby's (IMO) ugly syntax and go back to a language I find more aesthetically pleasing. I'm terribly ashamed to admit that. Then again, I have the same problem (just to a much greater degree) with perl, and I never feel bad about admitting that. It's almost definitely worth taking some time to familiarize yourself with both Ruby and Rails.
If you want a scalable application, go with PHP if you're not planning on your site going large (you don't know what the future holds, though) then go with RoR a lot of big sites are coded in php:- yahoo youtube buddypic vampirefreaks facebook ect. Another god language is asp.net, but it's costly..
scalable problems are problems that we all want. yahoo, youtube, facebook, myspace...are all billion dollar sites. the main advantage of RoR is that you need functionality quick, clean, and simple to implement. but at 11k hits a second, i am sure maybe 99.9 percent of websites out there only worry about this problem.
I knew that website like twitter and 43things based on RoR. How can we define the scalability between this website and Youtube etc (coded in PHP?)