Most Glorious <h1>HelloWorld</h1>
GLORY! After a butt load of research and tinkering my first words have trickled forth from the rails framework. The most glorious <h1>HelloWorld</h1> that I have ever experienced.
The hype for rails is caused by it’s apparent “swiftness”. It was suppose to be quick to install and quick to develop with. Yet the most recent Rails 2.2 seems to be trying to depreciate MySql which took me about 3 hours to figure out. Derek is not amused. I’m obviously a newbie to all this stuff and the majority of my woes were caused by reading outdated articles (2006.5). Also it seems that you MUST have a database linked up to the whole rig before you can even spew out a hello world, something most tutorials fail to mention (most likely because they were written for earlier versions). In the end I had to edit the config/database.yml file to suit my needs:
development:
adapter: mysql
encoding: utf8
database: test_development
pool: 5
username: root
password: (its a secret)
host: localhost
It turns out you can achieve this automatically if you create your file by typing the following in the CMD.
rails appName -d mysql
But wait, it still did not work. After more research I discovered that I had to uninstall MySql 5.1 and dl the older 5.0 and create the test_development table. Apparently the gems for MySql are not included in 2.2. The open source community must be trying to rebel against MySql. I must admit after typing my first 6 lines of MySql into the CMD i can’t blame them. I digress. Next I typed:
gem install mysql
Truthfully I don’t know if this really did anything. The CMD gave me some ambiguous error about Read me files and documentation not being created. I just ignored it assuming it was not important. Ok. Lets test again. Nope. Error cant find libmySQL.dll when I test in the browser. So here’s the tricky part. I finally found on hillemania blog that you have to manually copy the libmySQL.dll file from:
\MySQL\MySQL Server 5.0\bin
And put it in:
ruby\bin
Test. Holding breath…
<h1>HelloWorld</h1>
BOO YA! Best ever.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Yeehaw
The best feeling ever, eh?
All the best for your future.
@Laura many thanks. Afraid I don ‘t have time to sign up though it sounds interesting
Woohoo! Hope they heal quickly! Aside from the fact that they haven’t healed yet, how do you feel about the job this go around?
Yea, healed up. Just thought the post might help someone in the future, yet I doubt it will considering how quick the rails framwork changes. I can’t even remember the version this post was about.