As you might have noticed from the title, this is not a PHP or Ruby, or a PHP vs. Ruby question. This is a question on how to leverage PHP + Ruby in the same business.I myself am a PHP developer, I love the language because of its convenience and I specially love the ecosystem of resources that surround it: Joomla, Drupal, Wordpress, Symfony2, Doctrine2, etc. However, the language itself can be a little disappointing sometimes.OTOH, Ruby looks like a very beautiful language and from studying it superficially in several aspects I could say it is leaner than Python as a language per se. However, from what I've seen there is pretty much only RoR making noise, and I don't like RoR so much (mainly because its model layer).As Co-CEO and CTO at my company I'm trying to think outside of the box since I want to start to focus on the human side of technology and see if its sane to use both PHP and Ruby. Here are some random thoughts:Ruby folk seem to be generally better suited programmers than PHP folk (in terms of averages), I know the previous statement is somewhat baloney because very good and well architected PHP can be written, but I'd say the Ruby programmer culture is better than PHP's. The thing about Ruby is that it seems better suited for rapid development, I don't really know if this is only the case for RoR, but I do know that there are certain practices (perhaps not so good) like monkey patching that let business needs be satified quicker.From a marketing point of view (yep, sometimes you need to leverage the marketing BS for the sake of your company) Ruby seems better while PHP carries some stigmas.PHP 5.4 is bringing traits, and that is better/cleaner than mixins. That could really make PHP as lean as Ruby or more for certain stuff.Now, concretely, my questions:Would a PHP programmer want to learn Ruby?, I know I do, but conversely, would a Ruby programmer want to learn PHP?.What kinds of projects or situations would be better suited for Ruby that are not suited for PHP?.What is the actual ecosystem of Ruby?, aside from RoR, I have not seen other hyped technologies/frameworks (I've seen RSpec, but I confess being a total noob on what BDD really consists of and its implications).Supposing there are a certain type of projects ideal for Ruby, would there be a moment that its better to move it to PHP?. I know PHP can handle lots of stuff, but I've read that Ruby has its limitations when scaling (or is that RoR?, or is that baloney for both?).Finally and most importantly, would it be sane to maintain projects in two languages?, or is that just stupid. As I said, it looks like Ruby is leaner on the short term and that can make a project happen and succeed, but I'm not so sure about that on the long run.I'm looking for insights mainly from people that know well the strengths and weaknesses of the languages preferably both of them and Ruby's ecosystem in real practice, meaning: frameworks and applications like the ones I quoted from PHP's ecosystem. 
PHP and Ruby: how to leverage both? and, is it worth it?
php;ruby;business;web framework
Keep in mind, while reading my answers, that my PHP experience (> 10 years) is much higher than my Ruby experience (a few weeks of playing with it; no live project yet).Would a PHP programmer want to learn Ruby?Personally, I came to Ruby while looking for a cleaner language for web development (especially when it comes to multibyte string awareness) and server-side scripting (my OSX bash scripts always seem to have a niggle or two when they're run on my FreeBSD server).Before trying it, I had been toying with Lisp, Perl, Python and Node.js. I eventually abandoned Lisp because of the lack of a proper editor (it's emacs or nothing, and I hate emacs with a vengeance), the weirdness in building a web app (there are tools, but they don't feel natural to use) and the occasional quirkiness (I'm watching you, car, cdr and cons). I quickly dismissed Perl as just as stinky as PHP when it comes to multibyte string awareness. I didn't like Python much (it's just a taste thing; I've absolutely no valid reasons). And while promising, I stroke Node.js as too young and overhyped. (I considered Erlang, too, but never went beyond a tutorial.)Conversely, would a Ruby programmer want to learn PHP?.(...) Finally and most importantly, would it be sane to maintain projects in two languages?I can only speak for myself here, but the more I play with Ruby, the more I feel like puking whenever I read or write PHP code.What kinds of projects or situations would be better suited for Ruby that are not suited for PHP?.Anything that involves UTF-8 string handling, for one -- which arguably includes everything web-related. It's like, yes, in PHP there are the mb_* functions; and the Intl classes; and the /u modifier for the preg_* functions; and... As a PostgreSQL junky, I've come to take UTF-8 handling as a given. It's the kind of thing I don't want to be worrying about, especially when it comes to libraries, beyond locale-specific issues such as case and collation.(Ruby is not absolutely perfect in this respect, by the way. Python is a bit better. But I'd rather have mixins. In 15 years of coding, I've seldom needed to sort non-ascii strings outside of a database, or case-handle beyond transliterating bits and pieces that make it into a URI.)Shell scripting is another. PHP can be used for this kind of stuff too, but the language's inconsistencies and messiness makes it a lot less pleasant.What is the actual ecosystem of Ruby?, aside from RoR, I have not seen other hyped technologies/frameworks (I've seen RSpec, but I confess being a total noob on what BDD really consists of and its implications).There actually are several other frameworks than Rails: Merb, Camping, Ramaze, Sinatra, etc. It's just that RoR got a lot of hype early on.I've read that Ruby has its limitations when scaling (or is that RoR?, or is that baloney for both?).So has PHP. :-)Personally, I think it's baloney for Ruby. When scaling, in any language, you look at the bottlenecks and work on them one by one. From there, you scale vertically and horizontally.You replace your pet language when appropriate (I would not run a chat server or some high performance financial service in PHP or Ruby, for instance). But overall in my experience, the language is not the core of the problem when scaling, no matter how slow it is -- the architecture is. (If the language was at the core of the problem, sites would be mostly written in C, C++, C#, Java, Lisp, Erlang, etc. Each of the latter outperform PHP and Ruby by one or two orders of magnitude.)For RoR, I can't say. I only looked into it superficially. I fully understand why or how RoR would satisfy a graphic designer or a CS student, though. It insulted everything I've come to take for granted as a database developer.I later bumped into a long rant by Zed Shaw (a guy who wrote a Ruby web server), though. Among other things, he mocked the Rails creator for not being able to keep his own production servers running for more than 4 minutes on average. (This has improved since.)