# Phuby 1.0.0 Released

**URL:** <https://www.ruby-forum.com/t/phuby-1-0-0-released/186181>\
**Category:** Ruby\
**Created:** [April 1, 2010, 6:20pm UTC](https://www.ruby-forum.com/t/phuby-1-0-0-released/186181 "2010-04-01T18:20:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [April 1, 2010, 6:20pm UTC](https://www.ruby-forum.com/t/phuby-1-0-0-released/186181/1 "2010-04-01T18:20:17Z")

</div>

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](http://www.youtube.com/watch?v=lsWKjS6Vufw)  
[Wordpress on Ruby: Running wordpress from Rack - YouTube](http://www.youtube.com/watch?v=MXERy8Y2eVo)

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](http://github.com/tenderlove/phuby)

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

- [GitHub - tenderlove/phuby: phuby wraps PHP in a loving embrace](http://github.com/tenderlove/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.

---

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [April 1, 2010, 6:43pm UTC](https://www.ruby-forum.com/t/phuby-1-0-0-released/186181/2 "2010-04-01T18:43:42Z")

</div>

On Thu, Apr 1, 2010 at 10:18 AM, Aaron P.  
\<removed\_email\_address@domain.invalid

> 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.

---

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [April 1, 2010, 6:46pm UTC](https://www.ruby-forum.com/t/phuby-1-0-0-released/186181/3 "2010-04-01T18:46:03Z")

</div>

I was hoping for a realbasic runtime… Bummer!

2010/4/1 Aaron P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [April 1, 2010, 9:08pm UTC](https://www.ruby-forum.com/t/phuby-1-0-0-released/186181/4 "2010-04-01T21:08:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aaronpowell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/7bcc69/32.png) [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Post date:** [April 1, 2010, 7:42pm UTC](https://www.ruby-forum.com/t/phuby-1-0-0-released/186181/5 "2010-04-01T19:42:46Z")

</div>

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.
