|The stupid question is the question not asked|
Other people have covered many of the instrinsic (mentoring, education), extrinsic ("pleasant" workplace) and systematic aspects (well-defined goals and process) of creating a productive work environment.
Another thing is to find a way to listen to what people "don't tell you." Cubicles and email-based communication often hinder someone from listening to unspoken messages.
Sitting alongside with the people you work with helps. Creating atmosphere that people feel free to talk whenever they have concerns (as opposed to meeting-based communication) helps more.
What "unspoken" messages? Well, at a personal level, it includes dissatifaction with badly-written, badly maintained code (Difficult code (Resolutions)); some other coworkers/managers making unreasonable requests (work-related or otherwise) to some other.
At a project level, unclear project object or req spec. people might hestitate to speak out about for whatever reasons (which should be caught prior to implementation stage).
No news is not necessarily good news as it could be due to truly free of problems (rare) or there's communication failure (often). You don't want to find the bad news the moment someone telling he quits or a project collapses and fails.
* * * * * *
Another thought, don't do motivation by giving motivational speeches. It's annoying and demotivating. Good mentoring, as-organized-as-possible development process, pragmatic problem solving procedure (as opposed to you-can-do-it heroic Hollywood kind) motivate people much better.