If you have a family, in the most kind way you can think of, learn to say no. While you are at home trying hard to work, everyone will think you have lots of free time.
Find a place where you can work quietly when you really need it. Preferably not at home, not at a coffee shop, not anywhere you could be interrupted.
Find a mentor/buddy. Someone who knows more than you do. When some server configuration bullshit gets in your way, when some framework bug stops you, when some Ruby version 1.8.7 patch 154 won't work with Delayed Job (a made up example) you'll need someone with the experience to help you.
Wake up at the same time everyday. Got to sleep at the same time every day. Eat breakfast. Exercise. Throw out your television, don't visit HackerNews or reddit except once a day.
Use a managed hosting service avoid VPS unless you are already a good sys admin.