Ruby vs PHP
Well, I've been amazed by the RoR articles I've read, and I'm thinking...
Why am I using PHP, when RoR exists to simplify my life?
Can anyone tell me why I might consider a swift migration to RoR, and what I might lose by (not) doing so?
I must admit, I haven't done a lot of research on it, but just this once, if you don't tell me to google it, I'll be your biggest fan. : )
Does my web server need a RoR module, or is there a RoR server, or what, like CFM?
Cos I though CFM sucked, and PHP was king, cos it just worked with a basic Linux install. If I need a RoR install to get my RoR apps up and running, can anyone suggest a hosting company that either has such a thing installed, or would let me install it?
Thanks. Y'all rock.
> Why am I using PHP, when RoR exists to simplify my life?
There's a number of reasons to use PHP. It's a business decision that is beyond your influence. You can make use of one of the PHP frameworks or code libraries. You don't need a full MVC system, and PHP is more flexible for the code you want to write. You are forced to use PHP by other tech constraints. Whatever.
> I must admit, I haven't done a lot of research on it, but just this once, if you don't tell me to google it, I'll be your biggest fan. : )
I know. But this is a professional IT forum, so you are held to certain requirements ;p
> Does my web server need a RoR module, or is there a RoR server, or what, like CFM?
I believe Rails has a small web server app you can run for testing purposes (but not sure). For actual production purposes, I think Ruby is commonly used with FastCGI. There should be mod_ruby as an option as well, but I don't know if that's a production level option. This is information easily found by Googling and reading the Ruby/Rails site, so I leave that to you.
> If I need a RoR install to get my RoR apps up and running, can anyone suggest a hosting company that either has such a thing installed, or would let me install it?
Do take a look at the Rails site. No really. They not only have a list of hosting companies, but sometimes indicate special promotion codes you can use to get discounts. Their table of information beats anything I can tell you in a paragraph.
Yes, RoR is very nice. But it's not always the best choice. A number of factors go into choosing a language/framework/platform, and the best way you can make this decision is to learn as much as possible (with Google, reading).
I know I pretty much told you to Google, but your questions were answerable by Google.
Comments on this post
When you ask a question, be prepared to tell us: what have you tried? If you think you don't need to try anything, we will never be interested in helping you. If you agree with the link, and you refuse to answer that question, you are being a hypocrite.
Need help with broken code? Your question should be like a good bug report: (1) It has the smallest number of steps to reproduce the problem you see (2) It tells us precisely what you expected to see and (3) It tells us what you saw and how it differed from what you expected. We need all three to help you.
Want better answers? Tell us what you Googled for and what steps you took to answer your own question.
Thanks for that. Your help is much appreciated.
July 17th, 2007, 06:30 PM
Last edited by sf2k; July 17th, 2007 at 06:49 PM.
July 24th, 2007, 09:37 PM
I can't tell you why PHP is better, but I can tell you that Rails is awesome because I went from knowing nothing about the internets (except for some wordpress PHP and a little HTML) to this in two weeks (NOTE: I've been busy and havn't had too much time to work out the many bugs. But still! Two friggen weeks!)
Originally Posted by JellyBelly
Many will refer you to Dream hosters, but I think they suck. Their tech support is no good, and their Rails hosting is half-assed (Please excuse the language).
Originally Posted by JellyBelly
I use HostingRails. Their CS is great. By great I mean that you don't have to wait 24 hours to get a reply email. Usually in 30 minutes - 2 hours they'll reply and in 24 hours your problem will be solved. On top of all that their FAQ/Wiki pages are extremely in depth and useful (unlike Dreamhosters).
I have summoned you here for a purpose
September 28th, 2007, 08:17 PM
September 29th, 2007, 04:34 AM
No one has mentioned how new Ruby is compared to PHP, is it at the ranks of PHP yet? No, unfortunately no, will it be? Oh hell i hope so.
RoR doesn't support many CMS projects currently, which i have found is a common problem when RoR newcomers email me. However its increase in available plug ins excites me and i think it will be a true contender in some time to come
Comments on this post
March 7th, 2008, 01:58 AM
I thought about Ruby on Rails. I use Ruby mostly for scripting, but when I tried to use it as a web framework, I couldn't understand the damn thing. I set up a rails server, typed out a rhtml file, but it never got interpreted. Everything, including all my tags got output as raw text. I spent about 24 hours sifting through articles that made little sense, and seemed to be more about installing, and working from command line than anything. I eventually decided it wasn't worth the headache and stuck with php.
March 13th, 2008, 06:43 PM
as i knoiw guys ruby still not stable or smth like this ... so its hard to compare old but stable and new but kind of not stable language
March 16th, 2008, 07:05 PM
Ruby on rails is not Ruby, PHP is a language... CakePHP or CodeIgnighter would be a better comparison, where they are just as easy to use as Ruby on rails.
Ruby as a language is purely object oriented where as PHP is not. It's really a matter of preference.
Ruby has other frameworks, such as MERB.
Don't limit yourself there, why not try Python using Django or Web.py?
Really explore all of your possibilities, and dont become woo'd by hype.
March 17th, 2008, 04:57 PM
The main advantage is switching to a strong [MVC] framework. PHP offers several of these as well - like cakePHP and Codeigniter. However, I personally think Ruby is much better suited for an mvc framework than PHP - if you get some good experience with Ruby you will find that it is extremely elegant and when you can make use of its advanced OO features, it can do a lot in very little code.
There are many things that PHP just cannot do in a simple manner, and although some of the MVC frameworks try to duplicate what Rails does, you will find in the code that similar implementation in PHP can be quite ugly at times.
I must say that the transition is a little more difficult than you may have heard. Deployment is a major issue (you don't just upload and run, like PHP), and once you break outside the very small scope of the screencasts you have seen (the 15 minute blog), you will find there is a bit of a learning curve. At times you have to fight with Rails, it is very rigid and difficult to bend. Though many say this is because it forces you to write good code.
It's been said before - but Rails is just a framework. The actual language is Ruby, and as people have realized the power of this language, more and more frameworks have been springing up, some much smaller and more flexible than Rails.
i am not expert in ruby but i did the research for the same and i have read that code will be little bit complex in ruby with compare to PHP.
Ruby on Rails is cool
my local community college has a 3 day course for about 200 dollars , I am hoping to take this summer