Phuby 1.0.0 Released

THIS IS NOT A JOKE. I AM VERY SERIOUSLY RELEASING PHUBY.

Phuby embeds a PHP runtime inside a Ruby runtime. This gem will let
rails scale by allowing you to run PHP applications inside your rails
applications.

To see it in action, check out these youtube videos:

Phuby on Phails - YouTube
Wordpress on Ruby: Running wordpress from Rack - YouTube

I ENCOURAGE YOU TO NEVER EVER EVER INSTALL THIS SOFTWARE. Not only is
it difficult to install, but your computer might implode from the sheer
awesomeness of being able to use PHP inside your ruby applications.

Just think how awesome an embedded PHP interpreter would be. I know
most of you (like me) are coding Ruby day in and day out thinking “if
only I were programming in PHP, this would be much easier”. Well, (if
you’re brave enough) now you can!

Anyway. You can check out the codes here:

GitHub - tenderlove/phuby: phuby wraps PHP in a loving embrace

Below is the README with installation instructions. Remember that these
instructions are not for the faint of heart. I forgot to add this to
the README, but the last step is sacrificing one chicken.

phuby

DESCRIPTION:

Phuby wraps PHP in a loving embrace. Exposes a PHP runtime in ruby

FEATURES/PROBLEMS:

  • many

SYNOPSIS:

rt = Phuby::Runtime.new
rt.start

rt.eval(‘$hello = “world”’)
assert_equal “world”, rt[‘hello’]

rt.stop

REQUIREMENTS:

  • php

BUILD INSTRUCTIONS:

  • Download php-5.3.0

The following instructions apply to OS X (probably not needed on linux):

DO NOT change the prefix… No, I don’t know why yet.

Install iconv with macports

$ sudo port install iconv

Install MySQL with macports

$ sudo port install mysql5 mysql5-server

Set some symbolic links:

$ cd /opt/local
$ sudo ln -s mysql5/mysql include/mysql
$ sudo ln -s mysql5/mysql/libmysqlclient.15.dylib
lib/libmysqlclient.dylib

Patch and configure php

If you’re on OS X, apply php.patch to the downloaded php. Then
configure
php with the proper flags. These paths are for OS X, but you should be
able
to adjust them for linux:

$ patch -p0 < …/path/to/php.patch

$ ./configure --enable-debug
–enable-embed
–disable-cli
–with-mysql=/opt/local
–with-mysqli=/opt/local/lib/mysql5/bin/mysql_config
–with-mysql-sock=/opt/local/var/run/mysql5/mysqld.sock
–prefix=/usr/local

$ make && sudo make install

Then, either install the gem, or rake test

INSTALL:

  • No.

On Thu, Apr 1, 2010 at 10:18 AM, Aaron P.
<[email protected]

wrote:

Just think how awesome an embedded PHP interpreter would be. I know
most of you (like me) are coding Ruby day in and day out thinking “if
only I were programming in PHP, this would be much easier”. Well, (if
you’re brave enough) now you can!

Awesome, now we can stop hiring expensive Ruby developers and farm the
grunt
work for our Rails applications out to cheap PHP slave labor. It’s
truly
the best of both worlds.

I was hoping for a realbasic runtime… Bummer!

2010/4/1 Aaron P. [email protected]

On Apr 1, 2010, at 10:18 AM, Aaron P. wrote:

THIS IS NOT A JOKE. I AM VERY SERIOUSLY RELEASING PHUBY.

Phuby embeds a PHP runtime inside a Ruby runtime. This gem will let
rails scale by allowing you to run PHP applications inside your rails
applications.

I’m sorry, but a little vomit just came up in my mouth. You keep at it
Aaron while I go get the listerine.

TwP

Aaron P. wrote:

THIS IS NOT A JOKE. I AM VERY SERIOUSLY RELEASING PHUBY.

Do you hear that? Do you? It’s the sound a million kittens crying out
and then being silenced all at once.