Skip to content

Commit

Permalink
print asset:precompile --trace output if can't detect rake task
Browse files Browse the repository at this point in the history
  • Loading branch information
hone committed Jul 20, 2012
1 parent 56c6f6d commit 8bbf593
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/language_pack/rails3.rb
Expand Up @@ -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
Expand Down

0 comments on commit 8bbf593

Please sign in to comment.