Looking at the NORML link there, it looks like you're lucky that you were in one of the more lenient states when it comes to marijuana laws. I wouldn't expect anything worse than a fine and maybe a 6-month suspension of your driver's license (though I doubt they'll suspend your license for just one gram). Don't worry about rehab or community service or any of that stuff.