Language Bindings for Erlang Again
Mon Jun 12 14:25:30 CEST 2006
> 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.
Joe, I'm using OS X. I tend to build everything from source so I'm not
too familiar with Linux package management and how it affects Rails.
Plus, to be fair, I said "once you have everything installed" -- at
least Ruby, Rails and MySQL.
> 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.
Rails is based on the MVC pattern.
.rhtml are the ruby template files for the view.
.rb files are the controller, model and helper files.
.yml files are very simple data description files that populate your
database during testing. Rails, has an integrated unit testing
> 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.
Again -- I said "once you have everything installed." However, setting
up MySQL for the first time, although painful, at least should be a
good learning experience :)
> 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.
Well, you *almost* made it to the point when you're ready to see the
benefits Rails gives programmers. I hope you don't give up right now.
> 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.
You don't need Apache for developer. Just run "scripts/server".
> .... 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|...)
Unfortunately, as previously discussed on this list, Mnesia isn't
quite ideal for disc-based storage. Therefore, knowing MySQL or
Postgres will probably inescapable even for many users of Erlang on
Steroids. Unforutnately, the only help I can give them on this matter
is to google "erlang mysql".
> 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.
Any time! There are about 15 other frameworks I can recommend you in a
variety of different languages. Just let me know when you're done with
Rails :) I hope you at least couple of relations, set up some
relations and take it to the next step, where things *almost* start
looking interesting. I also recommend using RJS, so you can skip
More information about the erlang-questions