Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.

Precompilation fails #2

Closed
vilcans opened this issue Jul 29, 2014 · 2 comments
Closed

Precompilation fails #2

vilcans opened this issue Jul 29, 2014 · 2 comments

Comments

@vilcans
Copy link

vilcans commented Jul 29, 2014

I don't know if this is the same error as reported in issue #1, but the solution there doesn't work for me.

The log below is from trying to install Prelaunchr on Heroku, but I get the same error locally. The cause seems to be "refer/cream-tooltip@2x.png isn't precompiled".

I'm no Rails developer, so I don't know if there's something I did wrong here.

$ git push -u heroku master
Initializing repository, done.
Counting objects: 164, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (139/139), done.
Writing objects: 100% (164/164), 2.47 MiB | 132.00 KiB/s, done.
Total 164 (delta 19), reused 152 (delta 14)

-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.6.3
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       Fetching gem metadata from https://rubygems.org/..........
       Fetching additional metadata from https://rubygems.org/..
       Installing rake 10.0.3
       Installing multi_json 1.6.1
       Installing builder 3.0.4
       Installing i18n 0.6.4
       Installing journey 1.0.4
       Installing erubis 2.7.0
       Installing hike 1.2.1
       Installing mime-types 1.21
       Installing tilt 1.3.4
       Installing polyglot 0.3.3
       Installing rack 1.4.5
       Installing thor 0.17.0
       Installing sass 3.2.5
       Using json 1.7.7
       Installing orm_adapter 0.4.0
       Installing fastercsv 1.5.5
       Installing has_scope 0.5.1
       Installing arel 3.0.2
       Using bundler 1.6.3
       Installing coffee-script-source 1.4.0
       Installing tzinfo 0.3.36
       Installing bcrypt-ruby 3.0.1
       Installing raindrops 0.10.0
       Installing execjs 1.4.0
       Installing activesupport 3.2.11
       Installing treetop 1.4.12
       Installing rack-cache 1.2
       Installing rack-test 0.6.2
       Installing sprockets 2.2.2
       Installing rack-ssl 1.3.3
       Installing warden 1.2.1
       Installing bourbon 3.0.1
       Installing rdoc 3.12.2
       Installing coffee-script 2.2.0
       Installing pg 0.14.1
       Installing kgio 2.8.0
       Installing uglifier 1.3.0
       Installing activemodel 3.2.11
       Installing arbre 1.0.1
       Installing delayed_job 3.0.5
       Installing mail 2.4.4
       Installing actionpack 3.2.11
       Installing activerecord 3.2.11
       Installing activeresource 3.2.11
       Installing actionmailer 3.2.11
       Installing formtastic 2.2.1
       Installing railties 3.2.11
       Installing kaminari 0.14.1
       Installing polyamorous 0.5.0
       Installing delayed_job_active_record 0.4.4
       Installing devise 2.2.2
       Installing responders 0.9.3
       Installing jquery-rails 2.2.0
       Installing rails 3.2.11
       Installing coffee-rails 3.2.2
       Installing sass-rails 3.2.6
       Installing unicorn 4.6.0
       Installing meta_search 1.1.3
       Installing inherited_resources 1.3.1
       Installing activeadmin 0.5.1
       Your bundle is complete!
       Gems in the groups development and test were not installed.
       It was installed into ./vendor/bundle
       Post-install message from rdoc:
       Depending on your version of ruby, you may need to install ruby rdoc/ri data:
       <= 1.8.6 : unsupported
       = 1.8.7 : gem install rdoc-data; rdoc-data --install
       = 1.9.1 : gem install rdoc-data; rdoc-data --install
       >= 1.9.2 : nothing to do! Yay!
       Post-install message from meta_search:
       *** Thanks for installing MetaSearch! ***
       Be sure to check out http://metautonomo.us/projects/metasearch/ for a
       walkthrough of MetaSearch's features, and click the donate button if
       you're feeling especially appreciative. It'd help me justify this
       "open source" stuff to my lovely wife. :)
       Bundle completed (23.50s)
       Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/Rakefile:7)
       DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/Rakefile:7)
       rake aborted!
       refer/cream-tooltip@2x.png isn't precompiled
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/sprockets/helpers/rails_helper.rb:142:in `digest_for'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/sprockets/helpers/rails_helper.rb:151:in `rewrite_asset_path'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/action_view/asset_paths.rb:27:in `compute_public_path'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/sprockets/helpers/rails_helper.rb:56:in `asset_path'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/app/models/user.rb:18:in `<class:User>'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/app/models/user.rb:1:in `<top (required)>'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:359:in `require_or_load'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:502:in `load_missing_constant'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:192:in `block in const_missing'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:190:in `each'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:190:in `const_missing'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/app/admin/users.rb:1:in `<top (required)>'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `block in load'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activeadmin-0.5.1/lib/active_admin/application.rb:190:in `block in load!'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activeadmin-0.5.1/lib/active_admin/application.rb:190:in `each'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activeadmin-0.5.1/lib/active_admin/application.rb:190:in `load!'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activeadmin-0.5.1/lib/active_admin/application.rb:213:in `routes'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activeadmin-0.5.1/lib/active_admin.rb:79:in `routes'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/config/routes.rb:3:in `block in <top (required)>'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:282:in `eval_block'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/action_dispatch/routing/route_set.rb:260:in `draw'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/config/routes.rb:1:in `<top (required)>'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `block in load'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:245:in `load'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application/routes_reloader.rb:40:in `each'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application/routes_reloader.rb:40:in `load_paths'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application/routes_reloader.rb:16:in `reload!'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application.rb:108:in `reload_routes!'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activeadmin-0.5.1/lib/active_admin/reloader.rb:34:in `reload!'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activeadmin-0.5.1/lib/active_admin/reloader.rb:61:in `block in attach!'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:405:in `__run_callback'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:385:in `_run_prepare_callbacks'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/callbacks.rb:81:in `run_callbacks'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/reloader.rb:74:in `prepare!'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/action_dispatch/middleware/reloader.rb:48:in `prepare!'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application/finisher.rb:47:in `block in <module:Finisher>'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `instance_exec'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:30:in `run'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:55:in `block in run_initializers'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `each'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/initializable.rb:54:in `run_initializers'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application.rb:136:in `initialize!'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/railtie/configurable.rb:30:in `method_missing'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/config/environment.rb:5:in `<top (required)>'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `block in require'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:236:in `load_dependency'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application.rb:103:in `require_environment!'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/railties-3.2.11/lib/rails/application.rb:297:in `block (2 levels) in initialize_tasks'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/sprockets/assets.rake:93:in `block (2 levels) in <top (required)>'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/sprockets/assets.rake:23:in `invoke_or_reboot_rake_task'
       /tmp/build_1f357a67-7899-4868-8396-6215c5401b34/vendor/bundle/ruby/2.0.0/gems/actionpack-3.2.11/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
       Tasks: TOP => environment
       (See full trace by running task with --trace)
 !
 !     Precompiling assets failed.
 !

 !     Push rejected, failed to compile Ruby app
@danielschwartz
Copy link
Contributor

There are two solution here, the first of which is on Heroku which is why it wasn't added here. You either need to turn on user-env-compile on heroku by issuing

heroku labs:enable user-env-compile

or by adding the following line to production.rb

config.assets.initialize_on_precompile = false

Going to close this, but feel free to reopen if you still have issues.

@lolptdr
Copy link

lolptdr commented Feb 26, 2015

Using what Daniel wrote above did not work for me.

I followed the instructions suggested by @adamnbowen in #25 from Heroku's guide to deploying a Rails3 app https://devcenter.heroku.com/articles/getting-started-with-rails3 and got it to work:

Add this to config/application.rb, not in config/environments/production.rb:

config.assets.initialize_on_precompile = false

I also had to edit the procfile to match the one presented in the tutorial, ensure unicorn gem was added, and make sure no sqlite3 gem. This allowed me to deploy this Rails 3.2.13 app (updated app from 3.2.11 to 3.2.13 to get rid of the Formtastic warning).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants