Hi,
I asked this question a day or so ago - heres an update.
I’m following the “Agile Web D. with RAils” book and
succesfully built
the application therein. I’ve been banging my head against a wall for a
few days
trying to set up an app of my own following the same procedures as used
in the
book. All I get are 500 0 errors from WEBrick and nothing in the
browser. So…
Ihave a project in d:\ruby\projects\wf. I have three wf databases,
_development,
etc… I scaffolded a model, view, controller on the users table. I try
to access
this at http://localhost:3000/user/list and up comes 500 0 again. Now
the
development log shows nil. I open a console and type User.find_all and
up comes
my data. The dev log now shows " e[4;36;1mUser Columns (0.000000)e[0m
e[0;1mSHOW FIELDS FROM userse[0m
e[4;36;1mUser Load (0.000000)e[0m e[0;1mSELECT * FROM users e[0m
e[4;35;1mUser Columns (0.016000)e[0m e[0mSHOW FIELDS FROM userse[0m
e[4;36;1mUser Load (0.000000)e[0m e[0;1mSELECT * FROM users e[0m"
WTF is going on here?? As I understand it - the output from console
should be
the same as output to the browser? Please help - my head hurts and the
wall
doesn’t look too good either!
Try deleting all your sessions - if you traced the execution path
you’d probably find that Rails was throwing a fit about not being able
to load objects from the session.
Sessions are stored in /tmp/ruby-sess.* or something quite like it on
*nix/MacOS X - They’re in some hideously hidden M$ directory structure
under Documents and Settings on Windows.
Try deleting all your sessions - if you traced the execution path
you’d probably find that Rails was throwing a fit about not being able
to load objects from the session.
Sessions are stored in /tmp/ruby-sess.* or something quite like it on
*nix/MacOS X - They’re in some hideously hidden M$ directory structure
under Documents and Settings on Windows.
For me, on Windows XP, they are in C:\WINDOWS\Temp with names like
ruby_sess.2a9778de5955c4a9
Thanks James and Craig for responding. I found the problem and it was,
as suspected, quite dumb - if a little weird. My previous projects
worked perfectly using localhost and 127.0.0.1. This one, for some
reason, required the actual computer name. Given that, everything worked
as expected.
Kind Regards,
Eric
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.