3

我的 Dropbox 文件夹中有一个 rails app 项目文件夹。

我在两台电脑上工作——家用电脑和一台笔记本电脑(都是 win 7)

如果我bundle exec rake assets:precompile在电脑上做它工作正常,我看到这条线

C:/Ruby193/bin/ruby.exe C:/Ruby193/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
mkdir -p H:/My Dropbox/project/public/assets
cp -r C:/Ruby193/lib/ruby/gems/1.9.1/gems/tinymce-rails-3.5.7.1/vendor/assets/javascripts/tinymce H:/My Dropbox/project/public/assets

但是在笔记本电脑上,我对其中一个 tinymce 文件的权限被拒绝,并且预编译失败..

app文件夹对每个人都有权限..任何想法为什么会发生这种情况?

更新:

似乎它随机停止在文件上..不一定是tinymce。我已将所有 ruby​​ 文件和项目文件设置为对每个人都具有权限(win 7),并将所有只读设置为不是。

这很令人沮丧

--trace 输出的示例。请注意,每次我运行 assets:precompile 它都会在不同的文件处停止。这次它停在我的一个图标上

H:\My Dropbox\project>bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
C:/Ruby193/bin/ruby.exe C:/Ruby193/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Permission denied - H:/My Dropbox/project/public/assets/Icons/ArrowDown-335eb652931bdc13061ad1745a25556f.jpg
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/static_asset.rb:47:in `utime'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/static_asset.rb:47:in `write_to'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/sprockets/static_compiler.rb:41:in `block in write_asset'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/sprockets/static_compiler.rb:38:in `tap'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/sprockets/static_compiler.rb:38:in `write_asset'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/sprockets/static_compiler.rb:24:in `block in compile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:212:in `block in each_logical_path'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:200:in `block (2 levels) in each_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:in `each_entry'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:198:in `block in each_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:in `each_file'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sprockets-2.1.3/lib/sprockets/base.rb:210:in `each_logical_path'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/sprockets/static_compiler.rb:18:in `compile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/sprockets/assets.rake:56:in `internal_precompile'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:205:in `call'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:200:in `each'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:205:in `call'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:200:in `each'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `each'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:63:in `run'
C:/Ruby193/bin/rake:32:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [C:/Ruby193/bin/ruby.exe C:/Ruby193/bin/rak...]
C:/Ruby193/lib/ruby/1.9.1/rake/file_utils.rb:53:in `block in create_shell_runner'
C:/Ruby193/lib/ruby/1.9.1/rake/file_utils.rb:45:in `call'
C:/Ruby193/lib/ruby/1.9.1/rake/file_utils.rb:45:in `sh'
C:/Ruby193/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `sh'
C:/Ruby193/lib/ruby/1.9.1/rake/file_utils.rb:80:in `ruby'
C:/Ruby193/lib/ruby/1.9.1/rake/file_utils_ext.rb:39:in `ruby'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/sprockets/assets.rake:12:in `ruby_rake_task'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/actionpack-3.2.8/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:205:in `call'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:205:in `block in execute'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:200:in `each'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:200:in `execute'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:158:in `block in invoke_with_call_chain'
C:/Ruby193/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:151:in `invoke_with_call_chain'
C:/Ruby193/lib/ruby/1.9.1/rake/task.rb:144:in `invoke'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:116:in `invoke_task'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `block (2 levels) in top_level'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `each'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:94:in `block in top_level'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:88:in `top_level'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:66:in `block in run'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:133:in `standard_exception_handling'
C:/Ruby193/lib/ruby/1.9.1/rake/application.rb:63:in `run'
C:/Ruby193/bin/rake:32:in `<main>'
Tasks: TOP => assets:precompile
4

2 回答 2

1

从消除可能的问题开始。

首先,从等式中删除 DropBox。签出并在本地硬盘上编译。

其次,确保 TinyMCE 在您的 Gemfile 中并与 bundler 一起安装。您的项目不应该从全局 gem 中提取 gem,而是从项目特定的捆绑 gem 中提取。

如果失败,您需要遵循 Digital Cake 的建议并向我们提供 --trace 输出。

于 2012-11-07T23:23:24.953 回答
0

这是一个猜测,但我认为该权限是因为 tmp 折叠用于临时存储文件,因为它们是预编译的。a --trace 应该为您提供更好的错误日志,这将是找出错误发生位置的关键。

于 2012-11-05T20:43:36.363 回答