| Top Web News |
IBM
Taps Drupal For Dev Project Tutorial
Part one of a new series at IBM developerWorks focuses on the choice of an open
source content management platform for their closed community web site progress.
Google
Maps Does Click To Zoom
New features have been enabled on Google Maps, allowing users to try out a couple
of different ways to zoom in on a map. Google software engineer Liz Xu posted an update about Google Maps. The added features can be used online or through the Maps API v2.
Further
Furor Over eBay Payment Services
Last week, eBay announced that it would not allow the Google Checkout service.
It also declared that Nochex, another online payment service, would no longer
be accepted. This decision caused as much dismay for some as the Google Checkout
ban did for others.
Rocketboom
2.0 Delayed, Fans Lash Out
Rocketboom fans have been hanging on for the next boom since Amanda Congdon's
dramatic unbooming. The next incarnation is now two days late as the world awaits
how the new hostess will handle her duties, and to see if Rocketboom 2.0 will
reach liftoff.
YouTube
Users Go Political
According to YouTube, people watch "more than 70 million videos on this site daily."
That's a very impressive number. The "consumer media company" has been used most
often to show original, homemade videos, but networks and even politicians are
beginning to see its potential.
A
Nail In The Coffin For Windows 98
From this day forward, users of Windows 98 and Windows ME may be on their own.
Microsoft will stop offering updates and support (even of the "paid" variety)
for these products. The company seems to be hoping this will lead to increased
sales of newer Windows versions.
Skype
Offers Free International Calling
Adding to its aggressive campaign to attract more users, Skype launched a promotional
offer called the "Skype Days of Summer" that allows US and Canadian SkypeOut users
to make free international calls to the United Kingdom, Mexico, and Japan during
three July weekends.
Java
EE Marked For Death
Although the Java programming language will endure, the Java EE framework may
be deader than a doornail by 2010. There is a coffin and a headstone carved with
Java EE's name on it, and service-oriented architecture (SOA) will wield the spade
while the carillon tolls.
Ajax
Defined — A Look Back
Web development has changed dramatically over the past year with the implementation
of Asynchronous JavaScript + XML, also known as Ajax. Ajax has become a fixture
in technology lexicon. It is derived from Microsoft's work on remote scripting...
Firefox
Up In Share, Out In Beta
The Mozilla Firefox web browser has begun moving upward again in global market
share, and those users can now try out version 2.0 Beta 1 of the browser.
|
|
07.12.06 Mac OS X Ruby On Rails - Where To Go Next
By
A.P. Lawrence
When we left off with Mac OS X Ruby on Rails, I had Rails up and running but had not a clue as to where to go from there.
It's not hard to find information and tutorials on the net, but as always, assumptions are made, prerequisites are brushed by or ignored entirely, and you can find yourself in a hall of mirrors wondering which one of the reflections is what you really need. No doubt the page you are reading now will have similar deficiencies, so take a deep breath and be prepared for adverse conditions.
The first problem I encountered was mysql. The install steps I followed had me
bring down MySQL
for OS X Intel and modify my PATH to include /usr/local/mysql/bin. That's
wrong. You actually need your PATH to include:
/usr/local/mysql-standard-4.1.20-apple-darwin8.5.1-i686/bin/
because that's where that OS X package puts it. Or at least that's what I had
to do, and that's why these sorts of articles can lead you astray: things change
all the time. Recipes are great, and can sometimes work for those of us without
any culinary skills. But when you can't find any chopped pimento, my wife knows
what to do, and I do not. Same with computer software install recipes: if it all
works for you, that's great, but when it doesn't, you need a brain and some experience.
My day wouldn't be complete without revisiting my small MySQL Rant. While it remains true that databases are often employed doing labor better done with flat files or even in-memory tables, the fact is that all the cool kids have MySQL hats and we wouldn't want them dissing us any more than they already would, so I'll grit my teeth and use MySQL for this exposition. It is a trial and a tribulation to do so, and I expect a pat on the back accompanied by soothing words from you to show your appreciation of my pain.
I'm waiting.
Ok, fine, we'll go ahead anyway. Having properly finagled our path, it's time to create a database for our "try_rails" project.
mysqladmin -u root -p create try_rails_development
That asks for a password; if you've done nothing but follow the steps I outlined here, just press enter. If instead you are already wearing your MySQL tee-shirt, hat, and belt-buckle, you probably changed your MySQL root password and know what to type all by yourself. So don't ask me. But.. if you were the "I know what I'm doing" type, be aware that Rails needs to know your password, so you'll need to edit try_rails/config/database.yml and in doing so, you might understand why we created try_rails_development. Everyone else should just move along quietly - nothing more to see here, folks.
Some magic incantations:
cd try_rails
ruby script/generate migration accounts
I'm not entirely clear yet on what that really does. I'll take it on faith as
a necessary step for now.
vi db/migrate/001_accounts.rb
Yeah, you have to use vi. Oh, ok, you don't. Use whatever you want and stop moaning.
Edit the file and make it look like this:
Class Accounts < ActiveRecord::Migration
def self.up
create_table :puters do |table|
table.column :name, :string
table.column :proc, :string
table.column :cost, :float
end
end
def self.down
drop_table :puters
end
end
Now do this:
ruby script/generate scaffold puter expenses
cd try_rails; ruby script/server
(If you had left the server running, Ctrl-C will stop it)
More magic words. Ahh, the power of blind faith. The only part of that I understand
is the editing. Oh, yes, you can find explanations of the inner machinations of
these things on the web, and "script/generate" is of course just a Ruby program
that you could follow and ultimately comprehend. My knowledge of Ruby is insufficient
for that at the moment, so I'll just follow the recipes.
Amazingly enough, you now have a working application. Point your browser at http://localhost:3000/expenses and there it is. It's simple, and not all that glamorous, but it does the things it needs to do.
*Originally published at APLawrence.com
About the Author: A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com
|