我已经安装了django管道包,它在我的本地计算机上运行得很好。在
当我在生产环境中运行collectstatic时,会出现此问题,并出现以下错误:
升高压缩机错误(stderr) pipeline.exceptions.compressor错误:b'/usr/bin/env:\xe2\x80\x98yuglife\xe2\x80\x99:没有这样的文件或目录\n'
我也试过用不同的压缩机,但也没用。在
以下是我的设置:
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'pipeline.finders.PipelineFinder',
)
STATIC_URL = '/static/'
STATIC_ROOT = '/home/user/app/static'
MEDIA_ROOT = '/home/user/app/src/media'
MEDIA_URL = '/media/'
PIPELINE = {
'PIPELINE_ENABLED': True,
'STYLESHEETS': {
'main': {
'source_filenames': (
'/home/user/app/static/css/main.css',
),
'output_filename': 'css/main.css',
},
},
'JAVASCRIPT': {
'main': {
'source_filenames': (
'/home/user/app/static/js/main.js',
),
'output_filename': 'js/main.js',
}
}
}
PIPELINE['CSS_COMPRESSOR'] = 'pipeline.compressors.yui.YUICompressor'
PIPELINE['JS_COMPRESSOR'] = 'pipeline.compressors.yui.YUICompressor'
我做错什么了?在
非常感谢你!在
看起来您的环境中没有安装yuglify。在
我假设您正在处理unix,因此很容易确认: 运行命令
which yuglify
查看它的安装位置, 如果没有收到任何结果,您应该在环境中安装yuglify。在我个人通过npm顺利地安装了它:
npm -g install yuglify
相关问题 更多 >
编程相关推荐