Language Bindings for Erlang Again

Joe Armstrong (AL/EAB) joe.armstrong@REDACTED
Mon Jun 12 10:53:57 CEST 2006

Yariv Sadan posted the following *wonderful* advice:

> Joe, please do a Ruby on Rails tutorial (you can easily find one on
> Google) -- it'll be a very rewarding experience :) Once you 
> have everything installed, It shouldn't take you more than 
> than 10 minutes to create a complete database-driven Rails web app.
I did - and here's what happened ( this is long so, but there is a moral
at the end ...)

To start with its lucky Yariv said (Once you have everything installed)
- this step
took about 5 hours. Of course RoR didn't work "out of the box" on my
Ubuntu breezy.

I ran the good old 

> apt-get install   

Installed rails and got the *wonderful* error message

"Rails does not work with Ruby version 1.8.3
   Please upgrade to version 1.8.4 or downgrade to version 1.8.2."

This must the all-time greatest error message. 

For this to work you need *either* the previous version of the software
or the *next* version of the software - but NOT the version you actually

I Googled away and found several "this worked for me" recipes and
followed them
pedantically - did they work - NO.

Finally I did what I should have done from the start, take Ruby 1.8.2
and compiled
from the sources.

Two hours later I could start the tutorial.

Step one:

	Create the scaffolding

"Wow - something happened" Lot's of files were created - (and when I say
lots, I mean
lots) - all with funny extensions .rhtml, .rb, .yml - I've no idea what
these are - but
what ho - who cares - live dangerously, press on.

Then I had to edit one of these files and put my mysql password in.

Big problems - did you know I am the only programmer on the planet who
does not
not know how to configure MySQL. I didn't even know IO had MySQL
installed on
my machine - but there it was lurking on my hard disk - in a shady
corner where
I hadn't noticed.

I found that I could talk to MySQL as root - mysql didn't like Joe and
refused to
talk to him.

Back to google - I found dozens of magic spells that supposedly would
change Joe's
password - non worked. Finally I killed and reincarnated myself - 
this didn't even take three days - only another hour and half - though
is *felt*
like three days.

Then I could "run" my application. I gave some command, I forget which,
and pointed my
browser at localhost:3000 (I'm making this up - I forget) and BINGO

"Congratulations you have just programmed your first application"

At this stage I felt very pleased - "Wow - I'm a programmer" - the feel
good factor
was high here - time for a congratulatory glass.

Did any of the above sound familiar - Yariv was spot on "Once you have
everything installed, 
... shouldn't take you more than 10 minutes ..."

Now guess what - I hadn't even got this stuff running with Apache -
which I guess would take
another few hours of frustration.

.... after a couple of glasses of Riesling (I think) - or possibly a

I could clearly see how Erlang on Steroids should do things:

We'll call it the ONE TWO THREE method.

ONE: Install Erlang, then wget eos.tgz, unpack etc.

TWO: Create a directory somewhere:
     Type the command:

	> eos_make_app MyApp

     This should create a new directory, with a small number of files in
     These files should contain *English* and say what they do.

      If they do have code in the code should be "almost" English so you
can have
	some chance of understanding them. They should contain
references to manuals

THREE: Type the command:
	> eos_run_app MyApp

	The app will start and your browser will open a new page
pointing at the App

The applications should have those heart-warming feel goodwords -
you are a Genius and have just programmed your first application" -
which you can
show to your Gran and children - "Hey kids - come and look. Your father
is a Genius,
I've just programmed my first web app - how about that - I bet Jonny
WhistleThorp Jrn's.
Brother's half sister's taxi-driver's Father can't do that ... 
I have said (many times) that I do not want to have to learn three
things to
make a web app (ruby|python|php, mysql|oracle|..., apache|...)

ONLY ONE (erlang|mnesia=erlang|yaws=erlang)

Now all I have to do is rework the front end to eos - so that it
corresponds to
my daydream.

Oh, and thanks, Yariv, for the good advice.


More information about the erlang-questions mailing list