A commuter train derailed outside the Spanish city of Barcelona on Tuesday, killing one person and leaving 44 injured, the emergency services said on twitter.