Question

Recently changed this heroku app to mysql and now im getting this error with the asset pipeline

this is the complete output from heroku, I followed all the steps recomended by heroku to do this but nothing has worked.

i have this set on my application.rb

config.assets.initialize_on_precompile = false

also i have set the DATABASE_URL with the new mysql connection string trough heroku config.

This is basically the error im getting when deploying to heroku, im almost sure that this must be something really simple, but i just havent been able to figure it out.

Compiled application.css  (2781ms)  (pid 1424)
       rake aborted!
       same file: /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/public/assets/+ and /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/public/assets/+

Any Help would be greatly appreciated.

Fetching repository, done.
Counting objects: 306, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (242/242), done.
Writing objects: 100% (248/248), 43.37 KiB, done.
Total 248 (delta 171), reused 2 (delta 1)

-----> Removing .DS_Store files
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using 1.5.2
       Ruby version change detected. Clearing bundler cache.
       Old: ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]
       New: ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
       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/..
       Fetching git://github.com/rweng/jquery-datatables-rails.git
       Installing Ascii85 (1.0.2)
       Installing multi_json (1.8.4)
       Installing builder (3.0.4)
       Installing i18n (0.6.9)
       Installing rake (10.1.1)
       Installing journey (1.0.4)
       Installing erubis (2.7.0)
       Installing hike (1.2.3)
       Installing rack (1.4.5)
       Installing tilt (1.4.1)
       Installing polyglot (0.3.3)
       Installing mime-types (1.25.1)
       Installing orm_adapter (0.4.0)
       Installing sass (3.2.2)
       Installing thor (0.18.1)
       Installing fastercsv (1.5.5)
       Installing has_scope (0.5.1)
       Installing arel (3.0.3)
       Using bundler (1.5.2)
       Installing bcrypt-ruby (3.0.1)
       Installing json (1.8.1)
       Installing bootstrap-datetimepicker-rails (0.0.11)
       Installing tzinfo (0.3.38)
       Installing choice (0.1.6)
       Installing coffee-script-source (1.4.0)
       Installing hashery (2.1.0)
       Installing ruby-rc4 (0.1.5)
       Installing ttfunk (1.0.3)
       Installing ruby-graphviz (1.0.8)
       Installing rails_serve_static_assets (0.0.1)
       Installing will_paginate (3.0.3)
       Installing rails_stdout_logging (0.0.3)
       Installing execjs (1.4.0)
       Installing webrick (1.3.1)
       Installing rack-cache (1.2)
       Installing activesupport (3.2.9)
       Installing rails-i18n (0.7.0)
       Installing rack-test (0.6.2)
       Installing rack-ssl (1.3.3)
       Installing mysql2 (0.3.14)
       Installing warden (1.2.1)
       Installing sprockets (2.2.2)
       Installing bourbon (2.1.2)
       Installing bootstrap-sass (3.1.0.2)
       Installing treetop (1.4.15)
       Installing haml (4.0.5)
       Installing pdf-reader (1.2.0)
       Installing rails_12factor (0.0.2)
       Installing coffee-script (2.2.0)
       Installing uglifier (1.3.0)
       Installing rdoc (3.12.2)
       Installing activemodel (3.2.9)
       Installing activerecord-mysql2-adapter (0.0.3)
       Installing arbre (1.0.1)
       Installing mail (2.4.4)
       Installing activerecord (3.2.9)
       Installing actionpack (3.2.9)
       Installing activeresource (3.2.9)
       Installing polyamorous (0.5.0)
       Installing rails-erd (1.0.0)
       Installing actionmailer (3.2.9)
       Installing prawn (0.12.0)
       Installing formtastic (2.2.1)
       Installing kaminari (0.14.1)
       Installing meta_search (1.1.3)
       Installing railties (3.2.9)
       Installing rails (3.2.9)
       Installing responders (0.9.3)
       Installing jquery-rails (2.1.3)
       Installing devise (2.1.2)
       Using jquery-datatables-rails (1.11.1) from git://github.com/rweng/jquery-datatables-rails.git (at master)
       Installing coffee-rails (3.2.2)
       Installing sass-rails (3.2.5)
       Installing inherited_resources (1.3.1)
       Installing jquery-ui-rails (2.0.2)
       Installing activeadmin (0.5.0)
       Your bundle is complete!
       Gems in the groups development and test were not installed.
       It was installed into ./vendor/bundle
       Post-install message from ruby-graphviz:
       Since version 0.9.2, Ruby/GraphViz can use Open3.popen3 (or not)
       On Windows, you can install 'win32-open3'
       You need to install GraphViz (http://graphviz.org/) to use this Gem.
       For more information about Ruby-Graphviz :
       * Doc : http://rdoc.info/projects/glejeune/Ruby-Graphviz
       * Sources : http://github.com/glejeune/Ruby-Graphviz
       * NEW - Mailing List : http://groups.google.com/group/ruby-graphviz
       Last (important) changes :
       * GraphViz#add_edge is deprecated, use GraphViz#add_edges
       * GraphViz#add_node is deprecated, use GraphViz#add_nodes
       * GraphViz::Edge#each_attribut is deprecated, use GraphViz::Edge#each_attribute
       * GraphViz::GraphML#attributs is deprecated, use GraphViz::GraphML#attributes
       * GraphViz::Node#each_attribut is deprecated, use GraphViz::Node#each_attribute
       Post-install message from haml:
       HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
       your application:
       * Support for Ruby 1.8.6 dropped
       * Support for Rails 2 dropped
       * Sass filter now always outputs <style> tags
       * Data attributes are now hyphenated, not underscored
       * html2haml utility moved to the html2haml gem
       * Textile and Maruku filters moved to the haml-contrib gem
       For more info see:
       http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
       Post-install message from pdf-reader:
       ********************************************
       v1.0.0 of PDF::Reader introduced a new page-based API. There are extensive
       examples showing how to use it in the README and examples directory.
       For detailed documentation, check the rdocs for the PDF::Reader,
       PDF::Reader::Page and PDF::Reader::ObjectHash classes.
       The old API is marked as deprecated but will continue to work with no
       visible warnings for now.
       ********************************************
       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 prawn:
       ********************************************
       A lot has changed since 0.8.4
       Please read the changelog for details:
       https://github.com/sandal/prawn/wiki/CHANGELOG
       ********************************************
       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 (22.89s)
       Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       Compiled jquery.js  (3ms)  (pid 1424)
       Compiled jquery_ujs.js  (0ms)  (pid 1424)
       Compiled bootstrap.js  (172ms)  (pid 1424)
       Compiled bootstrap/affix.js  (0ms)  (pid 1424)
       Compiled bootstrap/alert.js  (0ms)  (pid 1424)
       Compiled bootstrap/button.js  (0ms)  (pid 1424)
       Compiled bootstrap/carousel.js  (0ms)  (pid 1424)
       Compiled bootstrap/collapse.js  (0ms)  (pid 1424)
       Compiled bootstrap/dropdown.js  (0ms)  (pid 1424)
       Compiled bootstrap/tab.js  (0ms)  (pid 1424)
       Compiled bootstrap/transition.js  (0ms)  (pid 1424)
       Compiled bootstrap/scrollspy.js  (0ms)  (pid 1424)
       Compiled bootstrap/modal.js  (0ms)  (pid 1424)
       Compiled bootstrap/tooltip.js  (0ms)  (pid 1424)
       Compiled bootstrap/popover.js  (0ms)  (pid 1424)
       Compiled typeahead.js  (1ms)  (pid 1424)
       Compiled dataTables/jquery.dataTables.js  (3ms)  (pid 1424)
       Compiled dataTables/jquery.dataTables.bootstrap.js  (0ms)  (pid 1424)
       Compiled bootstrap-datetimepicker.js  (0ms)  (pid 1424)
       Compiled jquery-ui.js  (5ms)  (pid 1424)
       Compiled active_admin/lib/namespace.js  (173ms)  (pid 1424)
       Compiled active_admin/components/jquery.aa.checkbox-toggler.js  (184ms)  (pid 1424)
       Compiled active_admin/components/jquery.aa.dropdown-menu.js  (198ms)  (pid 1424)
       Compiled active_admin/components/jquery.aa.popover.js  (196ms)  (pid 1424)
       Compiled active_admin/components/jquery.aa.table-checkbox-toggler.js  (179ms)  (pid 1424)
       Compiled active_admin/pages/application.js  (168ms)  (pid 1424)
       Compiled active_admin/pages/batch_actions.js  (166ms)  (pid 1424)
       Compiled active_admin/application.js  (1393ms)  (pid 1424)
       Compiled active_admin/base.js  (1461ms)  (pid 1424)
       Compiled active_admin.js  (1471ms)  (pid 1424)
       Compiled asignacion_tecnicos.js  (169ms)  (pid 1424)
       Compiled caso_facturados.js  (175ms)  (pid 1424)
       Compiled clientes.js  (172ms)  (pid 1424)
       Compiled historial_tecnicos.js  (203ms)  (pid 1424)
       Compiled registro_casos.js  (164ms)  (pid 1424)
       Compiled tecnicos.js  (164ms)  (pid 1424)
       Compiled application.js  (3030ms)  (pid 1424)
       Compiled index.css  (0ms)  (pid 1424)
       Compiled dataTables/jquery.dataTables.bootstrap.css  (45ms)  (pid 1424)
       Compiled application.css  (2781ms)  (pid 1424)
       rake aborted!
       same file: /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/public/assets/+ and /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/public/assets/+
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/asset.rb:157:in `write_to'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/sprockets/static_compiler.rb:39:in `block in write_asset'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/sprockets/static_compiler.rb:36:in `tap'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/sprockets/static_compiler.rb:36:in `write_asset'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/sprockets/static_compiler.rb:20:in `block in compile'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:in `block in each_logical_path'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:206:in `block (2 levels) in each_file'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each_entry'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in `block in each_file'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each_file'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in `each_logical_path'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/sprockets/static_compiler.rb:18:in `compile'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/sprockets/assets.rake:56:in `internal_precompile'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/sprockets/assets.rake:23:in `invoke_or_reboot_rake_task'
       /tmp/build_0aa9e509-f693-452f-885c-d32e2be60991/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.9/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
       Tasks: TOP => assets:precompile:primary
       (See full trace by running task with --trace)
 !
 !     Precompiling assets failed.
 !

 !     Push rejected, failed to compile Ruby app
Was it helpful?

Solution

Heroku uses PostgreSQL database so you need to use 'pg' gem in production environment. You can use MySql in development mode

In your Gemfile change 'mysql2' gem with

group :development do
  gem 'mysql2', '~> 0.3.15'
end

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end

Now run bundle install --without production to install the gems

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top