Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

print asset:precompile --trace output if can't detect rake task

  • Loading branch information...
commit 8bbf5932802e1e21f24ff6925203e63cf76daf0d 1 parent 56c6f6d
@hone hone authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/language_pack/rails3.rb
View
11 lib/language_pack/rails3.rb
@@ -61,10 +61,21 @@ def run_assets_precompile_rake_task
puts "http://devcenter.heroku.com/articles/rails31_heroku_cedar#troubleshooting"
end
end
+ else
+ if asset_pipeline_rails?
+ puts " ! Error running/detecting assets:precompiling task. Rerunning with --trace"
+ pipe("env PATH=$PATH:bin bundle exec rake assets:precompile --trace 2>&1")
+ end
end
end
end
+ # detects if the rails we're using has the asset pipeline
+ # @return [Bundler::LazySpecification] the matching gempsec for rails if true and nil if it isn't compatible
+ def asset_pipeline_rails?
+ lockfile_parser.specs.detect {|spec| spec.name == "rails" && spec.version >= Gem::Version.new("3.1.0") }
+ end
+
# setup the database url as an environment variable
def setup_database_url_env
ENV["DATABASE_URL"] ||= begin
Please sign in to comment.
Something went wrong with that request. Please try again.