Я возлюсь с приложением rails 3.1 и развертываю в Heroku Cedar.
При нажатии приложения Heroku пропускает этап предварительной компиляции, не выдавая ошибку:
Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Rails plugin injection
Injecting rails_log_stdout
Injecting rails3_serve_static_assets
-----> Discovering process types
Procfile declares types -> (none)
Default types for Ruby/Rails -> console, rake, web, worker
-----> Compiled slug size is 16.2MB
-----> Launching... done, v35
В последний раз, когда я нажимал на Heroku (возможно, месяц назад), у него не было проблем с прекомпиляцией ресурсов.
gem 'rails', '3.1.1.rc2', :git => 'git://github.com/rails/rails.git', :branch => '3-1-stable'
UPDATE:
Мне удалось заставить Heroku прекомпилировать, удалив изapplication.rb:
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require *Rails.groups(:assets => %w(development test))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
и заменить на:
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require *Rails.groups(:assets) if defined?(Bundler)