我不是一个 ruby 人,我正在使用 Ember.js 开发一个项目,我正在使用 Rake 管道来编译我的脚本。
# AssetFile
$: << 'lib'
require 'rake-pipeline-web-filters'
output BUILD
input SRC_DIR do
match '**/*.handlebars' do
handlebars :precompile => true
concat 'templates.js'
end
match '**/*.coffee' do
coffee_script
end
end
output JS_DIR
input BUILD_DIR do
match '*.js' do
concat 'app.js'
end
end
当我第一次在控制台上执行 rakep 时工作正常,但第二次出现const_missing
错误
c:/Ruby193/lib/ruby/1.9.1/rake/ext/module.rb:36:in `const_missing': uninitialized constant Rake::Pipeline::ManifestEntry::DateTime (NameError)
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/manifest_entry.rb:9:in `from_hash'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/manifest.rb:24:in `block in read_manifest'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/manifest.rb:23:in `each'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/manifest.rb:23:in `read_manifest'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/project.rb:225:in `last_manifest'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/filter.rb:219:in `create_file_task'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/filter.rb:197:in `block (2 levels) in generate_rake_tasks'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/filter.rb:196:in `each'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/filter.rb:196:in `block in generate_rake_tasks'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/filter.rb:194:in `each'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/filter.rb:194:in `map'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/filter.rb:194:in `generate_rake_tasks'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline.rb:410:in `block in generate_rake_tasks'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline.rb:407:in `each'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline.rb:407:in `generate_rake_tasks'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline.rb:333:in `setup'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline.rb:308:in `block in invoke'
from <internal:prelude>:10:in `synchronize'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline.rb:305:in `invoke'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/project.rb:111:in `each'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/project.rb:111:in `block in invoke'
from <internal:prelude>:10:in `synchronize'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/project.rb:110:in `invoke'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/lib/rake-pipeline/cli.rb:19:in `build'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor.rb:275:in `dispatch'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
from c:/Ruby193/lib/ruby/gems/1.9.1/gems/rake-pipeline-0.7.0/bin/rakep:4:in `<top (required)>'
from c:/Ruby193/bin/rakep:23:in `load'
from c:/Ruby193/bin/rakep:23:in `<main>'
当我手动删除文件或让时间过去时,rakep 命令工作正常
注意:我也无法对要连接的文件进行排序