Thursday, February 26, 2009

First Rails database

Starting on the Swadesh project, I made a little Rails database just using scaffolding.
rails Swadesh
cd Swadesh/
rake db:create
ruby script/generate scaffold word swadeshid:integer orthography:string languageid:integer
ruby script/generate scaffold language ancestorid:integer name:string
rake db:migrate
ruby script/generate scaffold lineup wordid:integer phonemeindex:integer spaces:integer
rake db:migrate
ruby script/generate scaffold phoneme tipa1:string tipa2:string bitmap:text
rake db:migrate


Next I gotta make the xref table between words and phonemes. That'll be fun!

Wednesday, February 25, 2009

Rails

Ad:

gem update rails
rails path/to/your/new/application
cd path/to/your/new/application
ruby script/server

Reality:

sudo gem update rails
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update rake
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update activesupport
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update activerecord
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update actionpack
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update actionmailer
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update activeresource
rails /Library/WebServer/Documents/Rails/Swadesh
cd /Library/WebServer/Documents/Rails/Swadesh
ruby script/server
sudo gem update --system
ruby script/server

Guys, transitive updating has been de rigeur for at least a decade now. Get with the times.
Not a promising start to learning Rails, but we'll see.Ad:

gem update rails
rails path/to/your/new/application
cd path/to/your/new/application
ruby script/server

Reality:

sudo gem update rails
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update rake
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update activesupport
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update activerecord
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update actionpack
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update actionmailer
rails /Library/WebServer/Documents/Rails/Swadesh
sudo gem update activeresource
rails /Library/WebServer/Documents/Rails/Swadesh
cd /Library/WebServer/Documents/Rails/Swadesh
ruby script/server
sudo gem update --system
ruby script/server

Guys, transitive updating has been de rigeur for at least a decade now. Get with the times.
Not a promising start to learning Rails, but we'll see.

Start of programming blog

This is my programming blog (not to be confused with my personal blog or my photography blog. This is where I write about nifty programming things, irksome problems, and my programming works in progress. 
And, no, I didn't set up this blog myself, it's blogspot-based. I wanted to be sure to have it up tonight, that's how impatient I am. Why blogspot? Mainly because they allow me to use my own domain name for the blog (once DNS comes through).