Актив прекомпиляции не работает - PullRequest
0 голосов
/ 02 марта 2012

Прекомпиляция оценок с 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

Ответы [ 3 ]

0 голосов
/ 07 марта 2012

Это похоже на проблему с asset_sync , а не с Heroku или задачей rake assets:precompile.

Мы разрабатываем asset_sync , поэтому, возможно, я смогу помочь. Я бы посоветовал вам попробовать следующее:

  • Убедитесь, что ваша конфигурация для asset_sync правильная
  • Обновление asset_sync до последней копии. Версия 0.3.0
  • Очистить корзину активов S3

Если ничего из этого не работает, пожалуйста, опубликуйте проблему на Github , и мы рассмотрим эту проблему для вас. У нас не было подобных отчетов, поэтому нам, возможно, придется посмотреть на анонимную версию вашего приложения, чтобы попытаться повторить проблему.

Вы также можете обратиться в службу поддержки Heroku за помощью по таким вопросам.

0 голосов
/ 09 марта 2012

Спасибо всем.

Я пытался "связать exec rake assets: clean assets: precompile", но все еще та же проблема.

Также asset_sync не является проблемой.

Я понял, что проблема связана с версией Axcon Gem "0.10.0". Поэтому я ограничил версию до «0.9.5». У меня это сработало.

0 голосов
/ 03 марта 2012

Просто попробуй ...

Для более новых версий Rails вам больше не нужно включать среду. Попробуйте использовать

bundle exec rake assets:clean assets:precompile
  • Гарантирует, что используется правильная версия рейка.
  • Гарантирует, что активы были очищены перед их повторной компиляцией.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...