My rails app uses Rails 3.2.15. When I try to deploy to Heroku, I get the error:
Asset logical path has no extension: ]
In other examples I've seen of the "asset logical path" error, the element after the colon was the filename. Why does it think there is a file called "]"?
Here is the full error:
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/asset.rb:36:in `initialize'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/base.rb:380:in `new'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/base.rb:380:in `build_asset'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/index.rb:94:in `block in build_asset'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/caching.rb:58:in `cache_asset'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/index.rb:93:in `build_asset'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/base.rb:287:in `find_asset'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/index.rb:61:in `find_asset'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/manifest.rb:211:in `block in find_asset'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/manifest.rb:257:in `benchmark'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/manifest.rb:210:in `find_asset'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/manifest.rb:119:in `block in compile'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/manifest.rb:118:in `each'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/sprockets/manifest.rb:118:in `compile'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-rails-2.0.0.backport1/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2.backport2/lib/rake/sprocketstask.rb:146:in `with_logger'
/tmp/build_4d16c741-7af1-443a-b0f0-8aad5d279d8f/vendor/bundle/ruby/1.9.1/gems/sprockets-rails-2.0.0.backport1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Multipack app
I can recreate this error locally by running the following command
bundle exec rake assets:precompile
Some background:
I'm trying to integrate bootstrap-sass with my Rails 3.2 app. I followed the install instructions for 3.2.x outlined on the gem page:
https://github.com/twbs/bootstrap-sass
This works locally, but when I try to deploy, I get the errors described above.
If you're still on this or other people find this like I did, the trouble is with putting anything without an extension in the app/assets, you can safely move files to vendor/assets to avoid this error. For instance I recently installed third party files with bower and set their location to app/assets, but had trouble pushing to heroku. After pulling them out and into vendor/assets it worked fine. Also see: https://github.com/sstephenson/sprockets/issues/347 and https://github.com/stve/bower/pull/4/files
for the issue and resolution.
I am unable to push to Heroku. When I attempt to I get an ExecJS::ProgramError: of some kind or another. I have had multiple people check my code and no one can seem to figure it out. It appears that I have something saved wrong possibly.
When I do git push heroku master I get the following when it tries to precompile the assets:
Running: rake assets:precompile
rake aborted!
ExecJS::ProgramError: Unexpected character '#' (line: 16164, col: 0, pos: 471385)
Error
at new JS_Parse_Error (/tmp/execjs20140502-719-9ngq7y.js:2357:10754)
at js_error (/tmp/execjs20140502-719-9ngq7y.js:2357:10973)
at parse_error (/tmp/execjs20140502-719-9ngq7y.js:2357:12691)
at Object.next_token [as input] (/tmp/execjs20140502-719-9ngq7y.js:2357:17713)
at next (/tmp/execjs20140502-719-9ngq7y.js:2357:19012)
at semicolon (/tmp/execjs20140502-719-9ngq7y.js:2357:19857)
at simple_statement (/tmp/execjs20140502-719-9ngq7y.js:2357:22669)
at /tmp/execjs20140502-719-9ngq7y.js:2357:20820
at /tmp/execjs20140502-719-9ngq7y.js:2357:20069
at /tmp/execjs20140502-719-9ngq7y.js:2358:40
(in /tmp/build_e82cf52d-86e5-45ea-83e9-
9841d4de5c60/app/assets/javascripts/application.js)/tmp/build_e82cf52d-86e5-45ea-
83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/execjs-
2.0.2/lib/execjs/external_runtime.rb:68:in `extract_result'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/execjs-2.0.2/lib/execjs/external_runtime.rb:28:in `block in exec'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/execjs-2.0.2/lib/execjs/external_runtime.rb:41:in `compile_to_tempfile'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/execjs-2.0.2/lib/execjs/external_runtime.rb:27:in `exec'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/uglifier-2.5.0/lib/uglifier.rb:186:in `really_compile'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/uglifier-2.5.0/lib/uglifier.rb:110:in `compile'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/uglifier_compressor.rb:25:in `evaluate'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/context.rb:197:in `block in evaluate'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `each'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `evaluate'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/bundled_asset.rb:25:in `initialize'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `new'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `build_asset'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:257:in `benchmark'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:210:in `find_asset'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:119:in `block in compile'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `each'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `compile'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/rake/sprocketstask.rb:146:in `with_logger'
/tmp/build_e82cf52d-86e5-45ea-83e9-9841d4de5c60/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:dumb-law.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:dumb-law.git'
I had the same problem and finally discovered the cause in the console output of the website, where it showed me an error of a js-file with illegal tokens. In my case, it was an empty, auto-generated coffeescript file, that I recklessly renamed into a js file, which doesn't use '#' for comments. The site still worked without problems but the precompilation did not. Removing the file solved my problem. Maybe you can find something similar in your js-console :)
Commenting out in production.rb resolved the problem for me
#config.assets.js_compressor = :uglifier
The answer is in config/environments/production.rb you have to change config.assets.compile = false to config.assets.compile = true
One reason this may happen is when renaming auto-generated coffee-scripts to js. They contain:
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
Which causes this error (because # should be changed to // in js).
I try to deploy my app to heroku but i'm getting this error:
Invalid CSS after " height: 4em;": expected "}", was "<<<<<<< HEAD"
Is the HEAD a problem in this situation?
I validated my custom.css file in w3 but nothing is changed.
Full trace of the error like that:
-----> 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_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/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_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/Rakefile:7)
rake aborted!
Invalid CSS after " height: 4em;": expected "}", was "<<<<<<< HEAD"
(in /tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/app/assets/stylesheets/custom.css.orig)
(sass):1166
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:1147:in `expected'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:1083:in `expected'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:1078:in `tok!'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:535:in `block'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:528:in `ruleset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:552:in `block_child'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:545:in `block_contents'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:82:in `stylesheet'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:27:in `parse'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/engine.rb:342:in `_to_tree'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/engine.rb:315:in `_render'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/engine.rb:262:in `render'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-rails-3.2.6/lib/sass/rails/compressor.rb:12:in `compress'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/compressors.rb:74:in `compress'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processing.rb:243:in `block in css_compressor='
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processor.rb:29:in `call'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processor.rb:29:in `evaluate'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in `block in evaluate'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `each'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `evaluate'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/bundled_asset.rb:26:in `initialize'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `new'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `build_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:19:in `block in compile'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:in `block in each_logical_path'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/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_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each_entry'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in `block in each_file'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each_file'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in `each_logical_path'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:18:in `compile'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:56:in `internal_precompile'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:23:in `invoke_or_reboot_rake_task'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/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
You appear to have a git merge conflict in your css file. Resolve the conflict, commit the changes, and try pushing again. Update: Just noticed that it is a *.orig file. Git mergetool will save a backup of the the file with the markers (like <<<<<<< HEAD etc) and append the suffix '.orig'. You should delete these before committing or if you want to keep them around for other reasons you should add *.orig to your .gitignore. See here for more information on strategies for handling mergetool backups.
This is an error in parsing the CSS file called "custom.css.orig". The .orig suffix and the "<<<<<<< HEAD" part of the error message makes me think that you have committed a merge conflict diff file by mistake. You probably didn't mean to commit that file, and if you remove it you should no longer get this error.
I'm trying to precompile my assets for production, but rails doesn't seem to be cooperating.
$ bundle exec rake assets:precompile
/home/drderp/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
rake aborted!
Unexpected token punc, expected punc (line: 213, col: 13, pos: 5986)
Error
at new JS_Parse_Error (<eval>:1720:22)
at js_error (<eval>:1728:15)
at croak (<eval>:2189:17)
at token_error (<eval>:2196:17)
at expect_token (<eval>:2209:17)
at Object.expect (<eval>:2212:40)
at Object.1 (<eval>:2763:38)
at prog1 (<eval>:2770:28)
at <eval>:2560:51
at maybe_unary (<eval>:2665:27)
(in /home/drderp/projects/p/app/assets/javascripts/application.js)
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/home/drderp/.rvm/rubies/ruby-1.9.3-p194/b...]
Tasks: TOP => assets:precompile
(See full trace by running task with --trace)
This is the entire contents of application.js:
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// the compiled file.
//
// Since javascript, no matter what order you load it in, executes in different order, it doesn't
// matter
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
// GO AFTER THE REQUIRES BELOW.
//
//= require jquery
Rails version 3.2.8, running on Ruby 1.9.3.
edit:
Here's bundle exec rake assets:precompile --trace, as requested:
$ bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/drderp/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets --trace
** Invoke assets:precompile:all (first_time)
** Execute assets:precompile:all
** Invoke assets:precompile:primary (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Invoke tmp:cache:clear (first_time)
** Execute tmp:cache:clear
** Execute assets:precompile:primary
rake aborted!
Unexpected token punc, expected punc (line: 213, col: 13, pos: 5986)
Error
at new JS_Parse_Error (<eval>:1720:22)
at js_error (<eval>:1728:15)
at croak (<eval>:2189:17)
at token_error (<eval>:2196:17)
at expect_token (<eval>:2209:17)
at Object.expect (<eval>:2212:40)
at Object.1 (<eval>:2763:38)
at prog1 (<eval>:2770:28)
at <eval>:2560:51
at maybe_unary (<eval>:2665:27)
(in /home/drderp/projects/p/app/assets/javascripts/application.js)
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:34:in `rescue in block in eval'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:28:in `block in eval'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:80:in `block in lock'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/therubyracer-0.10.2/lib/v8/c/locker.rb:13:in `Locker'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:78:in `lock'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:27:in `eval'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/execjs-1.4.0/lib/execjs/ruby_racer_runtime.rb:19:in `exec'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/uglifier-1.3.0/lib/uglifier.rb:100:in `compile'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/compressors.rb:74:in `compress'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processing.rb:265:in `block in js_compressor='
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processor.rb:29:in `call'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/processor.rb:29:in `evaluate'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:177:in `block in evaluate'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:174:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/context.rb:174:in `evaluate'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/bundled_asset.rb:26:in `initialize'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:244:in `new'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:244:in `build_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/index.rb:89:in `block in build_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/caching.rb:19:in `cache_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/index.rb:88:in `build_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:163:in `find_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/index.rb:56:in `find_asset'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/static_compiler.rb:23:in `block in compile'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:212:in `block in each_logical_path'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:200:in `block (2 levels) in each_file'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:190:in `each_entry'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:198:in `block in each_file'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:197:in `each_file'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/sprockets-2.1.3/lib/sprockets/base.rb:210:in `each_logical_path'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/static_compiler.rb:18:in `compile'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:56:in `internal_precompile'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/drderp/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/drderp/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `load'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/home/drderp/.rvm/rubies/ruby-1.9.3-p194/b...]
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in `ruby'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/drderp/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `load'
/home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake:19:in `<main>'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/home/drderp/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => assets:precompile
A more universal way to find the problem in js-assets:
Run rails console and:
JS_PATH = "app/assets/javascripts/**/*.js";
Dir[JS_PATH].each do |file_name|
puts "\n#{file_name}"
puts Uglifier.compile(File.read(file_name))
end
I had this same problem. Open your Javascript console in the browser and see where there is an error. I suspect (because it was the solution to my problem), that one of your JS files has an error and it is most likely whatever JS you wrote that used a ">" symbol.
Good luck error hunting.
In my case, I was using es6 syntax ()=>{...} in js file.
Replacing it with function(){...} fixed the problem.
This was horrible; no javascript error on my local computer means that there's an issue with asset compilation.
Here's how I solved it.
As suggested in the comments for a similar question ExecJS::ProgramError: Unexpected token punc «(», expected punc «:» when running rake assets:precompile on production , I removed uglifier (in production.rb, comment out the compressor line) and compression altogether. (I had tried with other compressors; yui did not give much information. closure seemed to give me a hint but didn't help much)
I then compressed the assets locally, then I pushed to production.
(To compress locally, use RAILS_ENV=production rake assets:precompile )
I ran on the server and this is when the javascript errors surfaced. It was basically erroneous merging of files (mainly due to something commented out).
I got rid of those lines and pushed back to production. Everything succeeded.
I brought back uglifier, deleted the precompiled assets under public/assets/ and pushed back to production.
I hope this helps someone!
Just a heads up on this, I had same issue and what was happening, when precompiling assets in production environment (and pushing to Heroku) several of my JS files were being inserted with foreign characters, along the lines of...
<<<<<<<<HEAD
===========
>>>>>>(random alphanumeric key)
I just ran a global search in my site directory for "<<" and quickly found the affected files & deleted these terms - everything worked fine.
Necessary details:
For us, it was a weird little thing which leads us to actual underlying error, hence solution.
We had uglifier gem v 4.1.x and latest at the time of writing is 4.2.x we updated the uglifier version, just in case.
And what happened was that this new version actually started spitting out actual file locations where the error of compilation was happening. And when we know where the error is coming from, we fix it.
Additional details:
The actual issue was that we had some js.erb files and these files were running some rails code to populate some env data, something like:
const config = {
abc: <%= Figaro.env.abc %>,
xyz: <%= Figaro.env.xyz %>
}
And the error we were getting was: Uglifier::Error: Unexpected token: punc (,).
So it was obvious for some reason Figaro was not giving us our desired values. We went on to fix that and checked our assumption by hardcoding random values, which compiled the JS successfully.
Putting it here so it may help someone.
PS: Top answer is great, but for some reason, it gave us some random jsx related errors to us instead of giving us an actual error.
For some reason, on Heroku and also when I ran the above-mentioned code to "uglify" the javascript in the rails console, it would not report the line number of the error!.
It is just a ruby wrapper for UglifyJS, which you can use online here https://skalman.github.io/UglifyJS-online/.
So I just copied and pasted the offending js file in here, and it reported the line number. Very easy.
Verify the new JS files that you added in your application include plugins and other added by Bower or something like it.
Try add one by one to find what file have problem. In my case was in anchor-scroll.js. When I changed to use anchor-scroll.min rake runs ok.
Change this:
//= require anchor-scroll/scroll
For:
//= require anchor-scroll/scroll.min
My problem was with two success calls.
First was mqtt onSuccess:
onSuccess() {
console.log("mqtt connected")
};
that I solved with:
onSuccess: function() {
console.log("mqtt connected")
};
and the second was Ajax success. Linter will show you
Error: Expected method shorthand
but everything will work properly.
"/home/drderp/.rvm/rubies/ruby-1.9.3-p194/bin/ruby /home/drderp/.rvm/gems/ruby-1.9.3-p194#global/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets"
There's a space between the bolded portion (between ruby, the backslash, and home).
I don't know if this was a typo, but it could be your problem because Rails doesn't like spaces in directory names. Rename that folder, and try running your code again.
I am running my Heroku Application on MySql Database.
Now i want to switch to the PostgreSql for some reason.For that i change database.yml and also change my migration files as required by PostgreSql.
I also change DATABASE_URL and SHARED_DATABASE_URL for the same application.
But when i go to the application it is getting crashed.
Heroku:logs showing following error
/disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:271:in `require_frameworks': can't activate rack (~> 1.0.0, runtime) for [], already activated rack-1.1.0 for ["thin-1.2.6"] (RuntimeError)
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:134:in `process'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/environment.rb:9
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:42:in `load_application'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:23:in `initialize'
from /home/heroku_rack/heroku.ru:29:in `new'
from /home/heroku_rack/heroku.ru:29
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:63:in `new'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:63:in `map'
from /home/heroku_rack/heroku.ru:18
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:11:in `new'
from /home/heroku_rack/heroku.ru:11
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:1:in `new'
from /home/heroku_rack/heroku.ru:1
==> dyno-1284675.log (crash) <==
/disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:271:in `require_frameworks': can't activate rack (~> 1.0.0, runtime) for [], already activated rack-1.1.0 for ["thin-1.2.6"] (RuntimeError)
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:134:in `process'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `send'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/../vendor/rails/railties/lib/initializer.rb:113:in `run'
from /disk1/home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/config/environment.rb:9
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:42:in `load_application'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/thin-1.2.6/lib/rack/adapter/rails.rb:23:in `initialize'
from /home/heroku_rack/heroku.ru:29:in `new'-----> Heroku receiving push
-----> Rails app detected
Compiled slug size is 15.3MB
-----> Launching.... done
from /home/heroku_rack/heroku.ru:29
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:63:in `new'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:63:in `map'
from /home/heroku_rack/heroku.ru:18
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:11:in `new'
from /home/heroku_rack/heroku.ru:11
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `instance_eval'
from /home/slugs/181380_0fa1c59_dfd1-7eadaa54-533c-4617-b1de-bf74852a7afe/mnt/.gems/gems/rack-1.1.0/lib/rack/builder.rb:46:in `initialize'
from /home/heroku_rack/heroku.ru:1:in `new'
from /home/heroku_rack/heroku.ru:1
-----> An error happened during the initialization of your app.
This may be due to a typo, wrong number of arguments, or calling a
function that doesn't exist.
Make sure the app is working locally in production mode, by running it
with RAILS_ENV (for Rails apps) or RACK_ENV (for Sinatra or other rack
apps) set to production. e.g. RAILS_ENV=production script/server.
Examine the backtrace above this message to debug.
==> cron-2153255.log (crash) <==
(in /disk1/home/slugs/181380_b09ba5c_aaf3-ed376a4c-936a-459f-b8c8-3111c45124e1/mnt)
config.gem: Unpacked gem CVS in vendor/gems has no specification file. Run 'rake gems:refresh_specs' to fix this.
config.gem: Unpacked gem CVS in vendor/gems not in a versioned directory. Giving up.
rake aborted!
undefined method `serve_static_assets=' for #<Rails::Configuration:0x2aec8dff9cc8>
(See full trace by running task with --trace)
-----> Your application crashed.
Examine the backtrace above this message to debug.
I want Steps to be followed while switching through database for Heroku or how to avoid the above mentioned Error.
EDITED:-
my .gems file is as follows
rails -v 2.3.8
spreadsheet --version 0.6.4
spreadsheet-excel --version 0.3.5.1
rack --version 1.1.0
money --version 2.2.0
fastercsv --version 1.5.3
xml-mapping --version 0.8.1
It gives same error when i change 'rack --version 1.1.0' ot 'rack --version 1.0.0'
Regards,
Salil Gaikwad
I don't know why but it works after comment out following line in the config/environments/production.rb
config.serve_static_assets = true
Now i want to know is comment out above line occur some problem in future? AND
what is the use of that code?