From: vfoley@... (Vincent Foley) Date: 2004-11-01T21:58:51+09:00 Subject: Re: Problem getting tiny RAILS demo working Is config/database.yml properly configured? An authorization error seems related to username and password. Check out http://www.rubyonrails.org/show/TutorialStepTwo to make sure your PostgreSQL configuration is okay. craig duncan wrote in message news:<41854418.6060704@nycap.rr.com>... > I've been following the instructions provided in > "http://darkhost.mine.nu:8080/~vince/rails/tutorial.html" to see if i > could get the basic database (Postgres)/webserver (WEBrick)/Rails > functionality working. Everything seems ok until i get to the part > where i stick "scaffold :album" into the AlbumController class. > > I've got two problems. 1a) postgres ident authorization won't work for > me for a non-postgres user (nothing to do with anything but postgres) so > i just made the first line in pg_hba.conf "local all all trust" and then > (re postgres all by itself) access seems to work ok... except when i go > to "http://localhost:3000/album" i see (1b): > > PGError in Album#index > FATAL: IDENT authentication failed for user "postgres" > [followed by a stack trace] > > (this is with "local all all trust" as the first line in pg_hba.conf) > I'm running WEBrick as a non-postgres, non-root user. > > Problem 2: I run WEBrick with -r debug and i get an exception raised in > /usr/lib/ruby/1.8/webrick/httpservlet/filehandler.rb#235: > > 235: st = (File::stat(res.filename) rescue nil) > > (rdb:2) p res.filename > "/home/craig/Album/public/album" > (rdb:2) > > Which is causing the following output (even when not running the debugger): > > # > 127.0.0.1 - - [31/Oct/2004:14:37:01 EST] "GET /album HTTP/1.1" 500 3657 > - -> /album > > There *is* no public/album directory, though. Is something wrong here? > There were no instructions to make this directory, it didn't get made > by either the new_model or new_controller scripts and (crucially) the > example cited above shows things working at this point (displaying > "Listing todos" in the tutorial). > > Could my Album object be insufficiently "business"-like?