how can i see what sql is used

when debugging a php application I often echo the SQL statements i
created, so i can copy and paste it for testing it in an sql browser to
find out what went wrong.

Can i do that in rails as wel?
Is there any way to see what sql is being submitted?

Watch the log file. If you're on unix you can "tail -f path/to/development.log" and you'll see the SQL that gets run...

-philip