How does Ripple ensure that transactions take place
How do individuals set who they 'trust'


Not sure what this means; each individual decides on his own who to trust. For example, I already (in a general sense) trust Bitstamp if I have USD or BTC deposits with them. Ripple just allows you to make this trust explicit in an open ledger. The meaning of this trust is, if I specify a trust level of $100, that the system will allow me to hold up to $100 of Bitstamp IOUs.


  How does the system respond if a user goes bankrupt


The system doesn't respond at all, as it merely keeps track of the IOU amounts - it does not, and cannot, enforce these claims. If one is willing to hold the IOU, it's probably because they believe it represents a claim that's enforceable in a court of law.


  What happens in the situation where there is no line between the sender and the receiver of money


Where there is no trust line, a transfer is not possible at all. If finding a trust path is difficult, one option is for them to offer liquidity in XRP - the only Ripple asset without counterparty risk. Then anyone who, on his own end, has path access to XRP will be able to send funds - the XRP acts as the 'trustless' bridge or vehicle currency.

Note that this is the role played by bitcoin in many situations today; for example bitcoin is used as a vehicle currency in various remittance models, and is able to offer advantages precisely because of its low trust requirements. 

In the end, XRP and BTC will compete for liquidity; whoever has the higher liquidity will have the lower costs.