Thursday, March 23, 2006

Gentoo and Rails 1.0, sqlite3, fastcgi and lighttpd

emerged sqlite3 and sqlite3-ruby
added USE flags, fcgi lighttpd
emerged ruby-fcgi lighttpd
uncommented "mod_fastcgi" and "mod_redirect" in /etc/lighttpd.conf

emerged rails

yankes and configured lserver and lighttpd.conf per http://www.bigbold.com/snippets/posts/show/303

executed "rails todoapp"
copied lighttpd.config to todoapp/config and lserver to todoapp/script
updated config/database.yaml---
development:
adapter: sqlite3
database: db/database_dev.db
test:
adapter: sqlite3
database: db/database_test.db

production:
adapter: sqlite3
database: db/database_prod.db
---

executed "script/generate migration InitialSetup"


updated db/migrate/001_initial_setup.rb---
class InitialSetup < text ="">"some new task", :date =>"11-21-1978", :done =>0
end

def self.down
drop_Table :todos
end
end

execute "rake migrate", and for some reason this hangs the first time, ctrl-c kills but it ran successfully...
execute "script/generate model Todo"

install ajax_scaffold-2.2.1.gem
execute "script/generate ajax_scaffold Todo"
execute "script/lserver"

point browser to http://localhost:8000/Todos

No comments: