| | |
Mixing PHP and Ruby together... opinions and suggestions.
Please support our Ruby advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Hey;
I have 6 months of work done in PHP and I really don't want to re-invent the wheel but I want to use some Ruby in my site. Is it possible to "mix languages" like PHP and ruby or will I run into some major problems? I would really appreciate your opinion. If your advice is helpful to my situation I'll add to your reputation.
I have 6 months of work done in PHP and I really don't want to re-invent the wheel but I want to use some Ruby in my site. Is it possible to "mix languages" like PHP and ruby or will I run into some major problems? I would really appreciate your opinion. If your advice is helpful to my situation I'll add to your reputation.
If I helped you I would appreciate it if you would give me some reputation.
read my actionscript to english blog
Currently developing what should be social network 2.0 offline.
read my actionscript to english blog
Currently developing what should be social network 2.0 offline.
•
•
Join Date: Jun 2009
Posts: 52
Reputation:
Solved Threads: 3
0
#2 11 Days Ago
It's completely plausible, as long as you're not trying to mix the two into the same file (it'd still be possible, just inefficient, as it'd have to be processed twice). And, it depends on what kind of site you're trying to build. For example, if you're building a 'web-app' where a large number of your PHP scripts just return data, and are never actually 'viewed' by a user, then your life will be quite simple.
0
#3 11 Days Ago
In short. No.
However, if, as noted before, you are using php files for data access, you can use pure ruby (or sinatra-like frameworks) to work with the data.
Rails will be extremely hard to mix code.
If your starting from scratch, learn ruby properly, and you won't need all that php code (if it's just crud code).
The whole idea of rails is to keep it clean, and what your suggesting isn't that clean. (would require a net://http to your own server, or using php command-line interface).
However, if, as noted before, you are using php files for data access, you can use pure ruby (or sinatra-like frameworks) to work with the data.
Rails will be extremely hard to mix code.
If your starting from scratch, learn ruby properly, and you won't need all that php code (if it's just crud code).
The whole idea of rails is to keep it clean, and what your suggesting isn't that clean. (would require a net://http to your own server, or using php command-line interface).
CodeJoust! Design + Development - Proud User of Ubuntu
![]() |
Similar Threads
- PHP vs Ruby (PHP)
- PHP or Ruby on Rails? (PHP)
- Scalable Web Architecture (IT Professionals' Lounge)
- DramayBaaz.com - Let me know Your Opinions and Suggestions (Website Reviews)
- eXtreme coder - C, PHP, Ruby. (Community Introductions)
- Need suggestions for website conversion to PHP (Existing Scripts)
- php phpmyadmin problem ?? (PHP)
- Configuration opinions/suggestions... (Troubleshooting Dead Machines)
Other Threads in the Ruby Forum
- Previous Thread: problems with ruby dbi
- Next Thread: (Installed Ruby 1.9.1) gem isn't working
| Thread Tools | Search this Thread |
ajax ajaxcode ajaxhelp amf arax archive array autosuggest basic beginner checkbox class close cms cookies curl database dehasher developers display dojofoundation dos duplicates dynamic email error errorlog file files flash form forms forum function functions gentoo google hosting href html httppost image include javascript jobs jquery keywords link login longisland mail memmory menu methods multiple mysql news nodes number oop paging php play post projectmanager protocol python query rails root ruby script search security select seo sessions sharepoint sms snippet source spam spring springsource sql table trouble tutorial unicode up-to-date upload variable vbulletin video vista vulnerability web yahoo youtube zend






