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

Precompilation fails #25

Closed
alfie-max opened this issue Jan 6, 2015 · 7 comments
Closed

Precompilation fails #25

alfie-max opened this issue Jan 6, 2015 · 7 comments

Comments

@alfie-max
Copy link

This is the same issue raise in 2#!

The two solutions provided there doesn't fix the issue for me:
Solution 1 was to turn on user-env-compile on heroku by issuing
heroku labs:enable user-env-compile
But user-env-compile is deprecated and so can't use that.

Solution 2 was by adding the following line to production.rb
config.assets.initialize_on_precompile = false
Tried that also, but doesn't work

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

Any more help would be appreciated.

@ahosmer1
Copy link

I am also having the same issues after having tried all of the above fixes

@alfie-max
Copy link
Author

And seems no one has a solution to it either.

@ravikiran438
Copy link

add :digest => false to all the asset_path in user.rb like below:

"image" => ActionController::Base.helpers.asset_path("refer/cream-tooltip@2x.png" , :digest => false)

and that should fix the problem

@adamnbowen
Copy link

If you follow the instructions on https://devcenter.heroku.com/articles/getting-started-with-rails3, and that should fix the issue.

@lolptdr
Copy link

lolptdr commented Feb 26, 2015

Copying what I wrote for #2:

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, 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).

@phamdt
Copy link
Contributor

phamdt commented Jun 23, 2017

is this still an issue? i'm not aware of this being investigated when we upgraded to rails 4 but am curious to know if those here have tried it since then.

@alfie-max
Copy link
Author

@phamdt no, doesn't seem to be an issue any more.

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

6 participants