Of course that the most official way is use ROR(Ruby On Rails).

But it’s hard to build. And here is the easiest way to run ruby from web request.

(The whole passage is based on Debian 4.0 Linux)

First install ruby (for linux)

apt-get install ruby irb rdoc

And creat a new php file as:

1
2
3
4
5
6
<?php
$d = $_GET['d'];
system("ruby /rb/$d",$echo);
//You may change the direction that you want to put ruby programs.
echo $echo;
?>

And now you can run ruby with this php program.

Use the browser to open

yourdomain/yourphpfilename.php?d=yourbname.rb

And the ruby program will run and prints results.

And if you use Lighttpd webserv insert rewrite rule:

url.rewrite = (
"^/(.+.rb)$" => "/yourphpfilename.php?d=$1",
)

If you already have some rewrite rules insert another rewrite rule

"^/(.+.rb)$" => "/yourphpfilename.php?d=$1",

Other webserv will be kind of the same.

An’ now. You can run your ruby programs through visit:

yourdomain/yourrubyfilename.rb

Today is the first day of the second semaster and is the Team Party day.

But, after the 4th block, I had to take a quiz because I missed that last Thursday for CrossCountry.

So, I was late for the practice.

And, I looked for them every where, and finally, I found them at the track.

So, what I only did today was the 10min cool down jog, so…

And then we head to the coach’s house.

And we had a great meal together. Chicken and smashed potatoes.

Then, we played football together. 3 on 3. Although I can’t play football well.

And, finally, we went to the basement.

I saw that there’s a guitar. And I got an great idea that I can make a Team Song.

It take me some time to made uo this little demo, and it’s not bad.

D                                    A
 
When you up and down the hill.
 
G                 D
 
Ten times no rest
 
D                            A
 
When you running on the track.
 
G          D
 
200 ten times
 
D             A
 
Speed up the hill.
 
G                D
 
Sprint down the hill.
 
D                A
 
Have you ever feel. That -
 
G                  G              D
 
We are the greatest team    Ever!

And I’ll make the whole song for the cross country before the end of CrossCountry.

05:48 PM

The First Final

No Comments, Diaries, by Wei.

Today is the final of hte first semester, lots of tests.

Fisrt is Morden World History CRT, Not Bad. B, maybe.

And then is Physics, I think I will got an A.

An’ about English, for some reason(illness,crosscountry) that I miss some staff, so, Maybe it’s B.

Finally, it’s Math, I’ve done the test for today and the CRT from yesterday. And I still need to take the quiz from yesterday on Monday.

It’s Really a busy day today.

But it’s Friday. An’ I’ll go to see the football match.

So, stop here, gotta go..

3rd place, the team didn’t make it, but some runner made it individually.

Duvon got 7th, Justin got 15th, and Yoyo got 13th.

We didn’t qualify for state, but we’ve done our best.

The course is a golf course, so it’s not very hard.

But it’s the District Varsity Race, so every one want to make it.

I don’t know what exactly time I got, but I think it was someting around 19m(5km).

And at the way back, we go to the Steak Buffet, and had a great meal.

It’s almost at the end of the CrossCountry season.

I like it so much, the sense when I running, the team, and the Meets.

I’ll miss it so much.

Omaha Bryan CrossCountry Varsity Team : Duvon, Justin, Tubouk, Corey, Marco, Wei, Luis.

The end

Ruby-in-browser

Hosted in Googlecode, seems to be JRuby.

HotRuby

A Japenese made this up. Seems can be run locally.

TryRuby

Official online ruby engin. Running like irb.

These three are the three engines that provided online.

I’m trying to turn it locally.

But, unfotunetely, I can’t.