3

私のドロップボックスフォルダーにあるレールアプリプロジェクトフォルダーがあります。

私は2台のコンピューターで作業しています-自宅のPCとラップトップ(どちらも7)

bundle exec rake assets:precompilePCで行うと正常に動作し、行が表示されます

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 ファイルの 1 つで許可が拒否され、プリコンパイルが失敗します。

アプリフォルダーには全員のアクセス許可があります..なぜこれが起こるのでしょうか?

アップデート:

ファイルでランダムに停止するようです..必ずしもtinymceではありません。私はすべてのルビーファイルとプロジェクトファイルを全員に許可するように設定し(win 7)、読み取り専用ではないものをすべて設定しました。

これは非常にイライラします

--trace 出力の例。assets:precompile を実行するたびに、別のファイルで停止することに注意してください。今回は私のアイコンの1つで止まりました

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 にあり、バンドラーでインストールされていることを確認してください。プロジェクトは、グローバル gem から gem をプルするのではなく、プロジェクト固有のバンドルされた gem をプルする必要があります。

それが失敗した場合は、Digital Cake のアドバイスに従い、--trace の出力を提供する必要があります。

于 2012-11-07T23:23:24.953 に答える
0

これは推測ですが、許可は、ファイルが事前にコンパイルされているときにファイルを一時的に保存するために使用される tmp フォルダーによるものだと思います。--trace を使用すると、より適切なエラー ログが得られるはずです。これは、エラーが発生している場所を特定するための鍵となります。

于 2012-11-05T20:43:36.363 に答える