train icon indicating copy to clipboard operation
train copied to clipboard

Production mode path issues

Open escholtz opened this issue 10 years ago • 2 comments

I recently upgraded train to latest from a version that was at least a few months old. After the upgrade, javascript_tag and stylesheet_tag helpers appeared to be broken in production mode. Not sure if this is an issue with train or the way I am using train.

I was able to fix my issues by changing flag.StringVar(&outPath, "out", "./public", "") in cmd.go to flag.StringVar(&outPath, "out", "public", ""). I think the ./ prefix was causing the strings.Replace calls in WriteToManifest to fail. Is this a bug with train or do you think there's something wrong with my local setup?

As a 2nd request, would you consider changing HasPublicAssets() to look for public/assets/manifest.txt instead of public/assets/? This would be useful because I'm storing other files in public/assets besides the files that train generates so I don't delete the entire folder when switching between development/production modes.

Thanks for your help and building this package. Keep up the good work!

escholtz avatar May 22 '15 18:05 escholtz

I have the same issue with production paths after upgrading to the latest version

deankarn avatar Jun 03 '15 15:06 deankarn

Hello, I am facing the same issue. Any plans to fix this? I can send a PR for it.

narup avatar Sep 29 '17 19:09 narup