Closed zw963 closed 3 years ago
I'm quite sure that... looking at your application, you probably don't load the full App
before the task happens.
Oh, now I see. It's operation order. You should do something like:
plugin :sprockets,
public_path: 'public/assets', # 运行 task生成 assets 的目标文件夹.
path_prefix: '/assets', # 生成 link 的时path 的前缀.
opal: true,
js_compressor: Terser.new,
css_compressor: :sassc,
debug: ENV['RACK_ENV'] != 'production',
cache: (Sprockets::Cache::MemoryStore.new(65536) if ENV['RACK_ENV'] == 'development')
Oops, thanks for point out, i meet this type issue again ....
Following is my config:
After i set the cache option,when run
RACK_ENV=production rake assets:precompile
, always raise following error.