预编译RAILS_ENV=production rake assets:precompile
给出错误的资产,例如:
rake aborted!
undefined method `empty?' for #<File:0xc1339e8>
堆栈追踪:
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionView::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ThemesForRails::AssetsController instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/usr/local/rvm/rubies/ruby-1.9.3-p125-perf/bin/ruby /usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionView::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ThemesForRails::AssetsController instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
** 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
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionView::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ThemesForRails::AssetsController instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionController::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
DEPRECATION WARNING: The InstanceMethods module inside ActiveSupport::Concern will be no longer included automatically. Please define instance methods directly in ActionMailer::Base instead. (called from require at /usr/local/rvm/gems/ruby-1.9.3-p125-perf@global/gems/bundler-1.0.22/lib/bundler/runtime.rb:68)
** Invoke assets:precompile:nondigest (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:nondigest
** Invoke assets:environment (first_time)
** Execute assets:environment
Using: Directory Search of /home/roo/Documents/RubyApplications/REALVOLVE/Realvolve-28-Feb/public/assets
Uploading: assets/application-08d5bf8b6880620e6c8aad0f7ffbe7c2.css.gz
rake aborted!
undefined method `empty?' for #<File:0xc1339e8>
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/excon-0.10.0/lib/excon/connection.rb:211:in `request_kernel'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/excon-0.10.0/lib/excon/connection.rb:92:in `request'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/fog-0.7.2/lib/fog/core/connection.rb:20:in `request'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/fog-0.7.2/lib/fog/storage/aws.rb:323:in `request'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/fog-0.7.2/lib/fog/storage/requests/aws/put_object.rb:43:in `put_object'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/fog-0.7.2/lib/fog/storage/models/aws/file.rb:119:in `save'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/fog-0.7.2/lib/fog/core/collection.rb:50:in `create'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/asset_sync-0.2.10/lib/asset_sync/storage.rb:117:in `upload_file'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/asset_sync-0.2.10/lib/asset_sync/storage.rb:129:in `block in upload_files'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/asset_sync-0.2.10/lib/asset_sync/storage.rb:127:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/asset_sync-0.2.10/lib/asset_sync/storage.rb:127:in `upload_files'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/asset_sync-0.2.10/lib/asset_sync/storage.rb:135:in `sync'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/asset_sync-0.2.10/lib/asset_sync/asset_sync.rb:29:in `sync'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/asset_sync-0.2.10/lib/tasks/asset_sync.rake:14:in `block in <top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-1.9.3-p125-perf/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/bin/rake:19:in `load'
/usr/local/rvm/gems/ruby-1.9.3-p125-perf@realvolve/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile
答案 0 :(得分:0)
试一试......
对于较新的Rails版本,您不必再包含环境。尝试使用
bundle exec rake assets:clean assets:precompile
答案 1 :(得分:0)
这似乎是asset_sync而非Heroku或rake assets:precompile
任务的问题。
我们开发 asset_sync ,所以也许我可以提供帮助。我建议你尝试以下方法:
如果这些都不起作用,请在Github上发布问题,我们会进一步为您解决问题。我们没有这样的报告,因此我们可能需要查看您应用的匿名版本,以尝试复制该问题。
您也可以向 Heroku支持寻求有关此类问题的帮助。
答案 2 :(得分:0)
感谢所有人。
我试过“捆绑exec rake资产:清理资产:预编译”但仍然是同样的问题。
asset_sync也不是问题。
我发现axcon gem版本“0.10.0”导致了这个问题。所以我将版本限制为“0.9.5”。它对我有用。