Any ideas why does this happen when deploying to Heroku:
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
Undefined mixin 'global-reset'.
(in /tmp/build_b4afrg7i0afu/vendor/bundle/ruby/1.9.1/gems/activeadmin-0.3.4/app/assets/stylesheets/active_admin/_base.css.scss)
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
Precompiling assets failed, enabling runtime asset compilation
Injecting rails31_enable_runtime_asset_compilation
I have an scss file with:
#import "compass/reset";
but why is it not finding it when compiling assets? Is there a way to just not compile them? It works fine at runtime and this step generates an exception that gets into airbrake and it's a pain.
Update: I run rake assets:precompile locally and I found the error seems to be generated by activeadmin:
$ rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/bin/ruby /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/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!
Undefined mixin 'global-reset'.
(in /Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activeadmin-0.4.0/app/assets/stylesheets/active_admin/_base.css.scss)
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activeadmin-0.4.0/app/assets/stylesheets/active_admin/_base.css.scss:4:in `global-reset'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/activeadmin-0.4.0/app/assets/stylesheets/active_admin/_base.css.scss:4
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:170:in `visit_mixin'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:27:in `block in visit_children'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:39:in `with_environment'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:26:in `visit_children'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:47:in `visit_root'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:18:in `visit'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/visitors/perform.rb:7:in `visit'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/tree/root_node.rb:20:in `render'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/engine.rb:300:in `_render'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-3.1.12/lib/sass/engine.rb:247:in `render'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sass-rails-3.1.5/lib/sass/rails/template_handlers.rb:95:in `evaluate'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/context.rb:175:in `block in evaluate'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `each'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/context.rb:172:in `evaluate'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:171:in `build_dependency_context_and_body'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:135:in `dependency_context'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:194:in `build_dependencies_paths_and_assets'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:141:in `dependency_paths'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:61:in `mtime'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/asset.rb:58:in `block in encode_with'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `each'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/asset.rb:57:in `encode_with'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/bundled_asset.rb:43:in `encode_with'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/caching.rb:52:in `cache_asset'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/index.rb:67:in `block in build_asset'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/index.rb:76:in `memoize'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/index.rb:65:in `build_asset'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/trail.rb:102:in `find_asset_in_path'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/base.rb:101:in `find_asset'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/index.rb:48:in `find_asset'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:20:in `block in compile'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/base.rb:151:in `block in each_logical_path'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/base.rb:139:in `block (2 levels) in each_file'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/base.rb:129:in `each_entry'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/base.rb:137:in `block in each_file'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/base.rb:136:in `each_file'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/sprockets-2.0.3/lib/sprockets/base.rb:149:in `each_logical_path'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/actionpack-3.1.3/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/actionpack-3.1.3/lib/sprockets/assets.rake:52:in `internal_precompile'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/actionpack-3.1.3/lib/sprockets/assets.rake:66:in `block (3 levels) in <top (required)>'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/actionpack-3.1.3/lib/sprockets/assets.rake:56:in `block (3 levels) in <top (required)>'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/pupeno/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/bin/rake:19:in `load'
/Users/pupeno/.rvm/gems/ruby-1.9.2-p290#watu/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
I reported this issue in case it's a bug.
Check if you did all of the following:
In config/application.rb, ensure you have the line:
config.assets.initialize_on_precompile = false
If you're loading scss files other than application.css, make sure they're included in the assets pipeline. You'll need a line line the following at the top of the file:
/*= require_self */
In addition to #2, In config/environments/production.rb, add those files to the assets list. For instance, if your file is my.scss, you need a line like:
config.assets.precompile += %w( my.css )
Finally, there's a great guide at http://guides.rubyonrails.org/asset_pipeline.html
Related
For some reason bin read cannot read the an image file form the standard assets directory and is failing with the following message:
C:\Users\username\Documents\project>bundle exec rake assets:precompile
RAILS_ENV=development --trace
DL is deprecated, please use Fiddle
DL is deprecated, please use Fiddle
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
I, [2015-08-20T16:43:52.031167 #2664] INFO -- : Writing C:/Users/username/Documents/project/public/assets/xxx-5e3812eb433519f2816f938f5c3512a8a272644bd73273a3680ceb6f625b701a.png
rake aborted!
Errno::EINVAL: Invalid argument # rb_sysopen - C:/Users/username/Documents/project/C:/Users/username/Documents/project/app/assets/images/xxx.png
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/asset.rb:99:in `binread'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/asset.rb:99:in `source'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/asset.rb:166:in `block in write_to'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:274:in `block in atomic_write'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:273:in `open'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:273:in `atomic_write'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/asset.rb:165:in `write_to'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/manifest.rb:186:in `block in compile'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/manifest.rb:139:in `block (2 levels) in find'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/base.rb:76:in `find_all_linked_assets'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/manifest.rb:138:in `block in find'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:223:in `block in stat_tree'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:207:in `block in stat_directory'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:204:in `each'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:204:in `stat_directory'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/path_utils.rb:222:in `stat_tree'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/legacy.rb:105:in `each'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/legacy.rb:105:in `block in logical_paths'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/legacy.rb:104:in `each'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/legacy.rb:104:in `logical_paths'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/manifest.rb:136:in `find'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/sprockets/manifest.rb:162:in `compile'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-3.3.2/lib/rake/sprocketstask.rb:147:in `with_logger'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/sprockets-rails-2.3.2/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/rake-10.4.2/bin/rake:33:in`<top (required)>'
C:/RailsInstaller/Ruby2.1.0/bin/rake:23:in `load'
C:/RailsInstaller/Ruby2.1.0/bin/rake:23:in `<main>'
Tasks: TOP => assets:precompile
I found the solution: it turns out that the internal asset cache in sprockets gem somehow got corrupted file names and as a result the link to the actual image file was causing an exception. Use the following application config setting to flush the cache and overcome this: # Version of your assets, change this if you want to expire all your assets config.assets.version = 'v.2'
I was trying to get my project working on Heroku but when I was trying to run "rake db:migrate" got the following
any idea????
Thanks :)
P.D: I think the probles is here
** Execute db:schema:dump
rake aborted!
Because
Rake tasks that write to disk, such as rake db:schema:dump, are not compatible with Heroku’s ephemeral filesystem.
PS C:\Users\siel3\Documents\nimbus> heroku run rake db:migrate --trace
Running `rake db:migrate --trace` attached to terminal... up, run.6524
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
** Invoke db:_dump (first_time)
** Execute db:_dump
** Invoke db:schema:dump (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:schema:dump
rake aborted!
Errno::ENOENT: No such file or directory - /app/db/schema.rb
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/railties/databases.rake:243:in `initialize'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/railties/databases.rake:243:in `open'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/railties/databases.rake:243:in `block (3 levels)
in <top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/railties/databases.rake:50:in `block (2 levels)
in <top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/app/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.2/lib/active_record/railties/databases.rake:45:in `block (2 levels)
in <top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/bin/rake:23:in `load'
/app/vendor/bundle/ruby/2.0.0/bin/rake:23:in `<main>'
Tasks: TOP => db:schema:dump
Do you not have a db/schema.rb file in your application? That file should be in ApplicationName/db/schema.rb If this is your first upload to heroku maybe try to run rake db:seed first to create the schema file, then do your migrations after.
The problem was Windows...
Windows rename the /db folder as /DB, and heroku breaks if this happens.
I get this error when I try to precompile assets. I'm fairly new to Rails and dealing with the asset pipeline makes me want to pull my hair out, lol. I get this same error trying it with ruby 1.9.2-p320, or ruby 1.9.3-p448. Using Rails 3.2.13. The hard part for me is looking at the error output and understanding where to look for the error. I don't see a lot of explanations on how to do that. Am I correct that the error is in a rails helper file? If so, where is that?
Here is the rake assets:precompile --trace results:
ruby-1.9.2-p320#stacy1 MARKs-MacBook-Air:stacy1 mark$ rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/Users/mark/.rvm/rubies/ruby-1.9.2-p320/bin/ruby /Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/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!
undefined method `[]' for nil:NilClass
(in /Users/mark/Documents/projects/hosting/stacy1/app/assets/stylesheets/application.css.scss)
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-rails-3.2.6/lib/sass/rails/helpers.rb:32:in `resolver'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-rails-3.2.6/lib/sass/rails/helpers.rb:25:in `font_url'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/script/funcall.rb:112:in `_perform'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/script/node.rb:40:in `perform'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:298:in `visit_prop'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:356:in `visit_directive'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `block in visit_children'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `map'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:53:in `visit_children'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:109:in `block in visit_children'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:121:in `with_environment'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:108:in `visit_children'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `block in visit'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:128:in `visit_root'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/base.rb:37:in `visit'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:100:in `visit'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/visitors/perform.rb:7:in `visit'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/tree/root_node.rb:20:in `render'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/engine.rb:315:in `_render'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-3.2.12/lib/sass/engine.rb:262:in `render'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sass-rails-3.2.6/lib/sass/rails/compressor.rb:12:in `compress'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/actionpack-3.2.13/lib/sprockets/compressors.rb:74:in `compress'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/processing.rb:243:in `block in css_compressor='
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/processor.rb:29:in `call'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/processor.rb:29:in `evaluate'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in `block in evaluate'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `each'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `evaluate'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/bundled_asset.rb:26:in `initialize'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `new'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `build_asset'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:19:in `block in compile'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:in `block in each_logical_path'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/base.rb:206:in `block (2 levels) in each_file'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each_entry'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in `block in each_file'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each_file'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in `each_logical_path'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:18:in `compile'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:56:in `internal_precompile'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/Users/mark/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/Users/mark/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:149:in `invoke_task'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/bin/rake:23:in `load'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/bin/rake:23:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/Users/mark/.rvm/rubies/ruby-1.9.2-p...]
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/file_utils.rb:55:in `block in create_shell_runner'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/file_utils.rb:45:in `call'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/file_utils.rb:45:in `sh'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/file_utils_ext.rb:37:in `sh'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/file_utils.rb:82:in `ruby'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/file_utils_ext.rb:37:in `ruby'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:236:in `call'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:236:in `block in execute'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:231:in `each'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:231:in `execute'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/Users/mark/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:168:in `invoke_with_call_chain'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/task.rb:161:in `invoke'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:149:in `invoke_task'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/bin/rake:23:in `load'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/bin/rake:23:in `<main>'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/bin/ruby_executable_hooks:15:in `eval'
/Users/mark/.rvm/gems/ruby-1.9.2-p320#stacy1/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => assets:precompile`enter code here`
Here is the application.css.scss file:
/*
*= require_self
*= require_tree .
*/
You use image-url(/path/to/file.png) in .css file,change it for url(/assets/path/to/file.png)
I resolved this issue by moving my development to RVM using ruby 2.0.0 and rails 4.0. Everything worked fine after that. I slowly added my files into the new configuration and kept running the precompile to make sure it worked every step of the way. Thanks for everyone's help.
Since two days, I am not able to compile the javascript assets in my ruby on rails project anymore. If I do not run the precompile command, the same fault occurs when ruby is compiling the assets at runtime. The 'rake assets:precompile' command aborts because of a segmentation fault:
bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/Roseboom/.rvm/rubies/ruby-1.9.3-p125/bin/ruby /home/Roseboom/.rvm/gems/ruby-1.9.3-p125/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
sh: regel 1: 15071 Segmentatiefout node /tmp/execjs20120417-15062-69pd5q.js 2>&1
rake aborted!
["ok","(function() {\n\n\n\n}).call(this);\n"]
(in /home/Roseboom/gitControlled/ror/livescore/app/assets/javascripts/clubs.js.coffee)
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/execjs-1.3.0/lib/execjs/external_runtime.rb:150:in `exec_runtime'
[.... Remaining stacktrace below this post for the sake of readability ]
Here, 'Segmentatiefout' is Dutch for 'Segmentation fault'.
At first, I thought I messed something up with my project, and I started reverting changes to isolate the 'bad' change. When this did not help, I tried the 'bundle exec rake assets:precompile' in a project that I did not tough for weeks, which got me the same segmentation fault.
Now I tried to locate this "execjs20120417-15062-69pd5q.js" file to just remove it. Even with the help of the unix 'find' command, I could not find that. Maybe this temp file is cleaned even when aborted.
Next thing I tried was to reinstall rake, which did not help me. Although the same fault occured when just running 'rake assets:precompile', I tried reinstalling bundler as well. This did not work out as well.
Next thing was a bit rigorously, I reinstalled ruby and rails on my system. Unfortunately, no change at all. Rails version was 3.2.2, and after this reinstalling it is 3.2.3.
Last thing I tried was to uninstall the gem execjs, and reinstall it, but no help from this as well.
Changing the RAILS_ENV to development does not change anything as well.
When I clear my app/assets/javascripts folder, I can precompile, and I can run my application (like described in Rails assets precompile mysterious error). I expect ruby to use the assets that were compiled succesfully before. However, this means I can never change the contents of app/assets/javascripts, which is undesirable. If I remove all the .js.coffee files that are there, the segmentation fault occurs on the .js file that is left.
The file clubs.js.coffee is autogenerated and never changed by me. It was generated a few weeks ago and never got me problems before 2 days ago. If I remove it, the same fault occurs with just another .coffe or .js file. clubs.js.coffee contains:
# 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://jashkenas.github.com/coffee-script/
I am really out of ideas on this. Thanks in advance for your help.
Full stacktrace:
bundle exec rake assets:precompile --trace
** Invoke assets:precompile (first_time)
** Execute assets:precompile
/home/Roseboom/.rvm/rubies/ruby-1.9.3-p125/bin/ruby /home/Roseboom/.rvm/gems/ruby-1.9.3-p125/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
sh: regel 1: 15936 Segmentatiefout node /tmp/execjs20120417-15927-1ka3s2r.js 2>&1
rake aborted!
["ok","(function() {\n\n\n\n}).call(this);\n"]
(in /home/Roseboom/gitControlled/ror/livescore/app/assets/javascripts/clubs.js.coffee)
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/execjs-1.3.0/lib/execjs/external_runtime.rb:150:in `exec_runtime'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/execjs-1.3.0/lib/execjs/external_runtime.rb:27:in `block in exec'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/execjs-1.3.0/lib/execjs/external_runtime.rb:40:in `compile_to_tempfile'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/execjs-1.3.0/lib/execjs/external_runtime.rb:26:in `exec'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/execjs-1.3.0/lib/execjs/external_runtime.rb:18:in `eval'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/execjs-1.3.0/lib/execjs/external_runtime.rb:32:in `call'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/coffee-script-2.2.0/lib/coffee_script.rb:57:in `compile'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/tilt-1.3.3/lib/tilt/coffee.rb:46:in `evaluate'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/tilt-1.3.3/lib/tilt/template.rb:76:in `render'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/context.rb:177:in `block in evaluate'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/context.rb:174:in `each'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/context.rb:174:in `evaluate'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/processed_asset.rb:12:in `initialize'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:241:in `new'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:241:in `block in build_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:262:in `circular_call_protection'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:240:in `build_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/index.rb:89:in `block in build_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/caching.rb:19:in `cache_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/index.rb:88:in `build_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:163:in `find_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/index.rb:56:in `find_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/processed_asset.rb:106:in `block in build_required_assets'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/processed_asset.rb:100:in `each'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/processed_asset.rb:100:in `build_required_assets'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/processed_asset.rb:16:in `initialize'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:241:in `new'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:241:in `block in build_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:262:in `circular_call_protection'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:240:in `build_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/index.rb:89:in `block in build_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/caching.rb:19:in `cache_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/index.rb:88:in `build_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:163:in `find_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/index.rb:56:in `find_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/bundled_asset.rb:16:in `initialize'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:244:in `new'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:244:in `build_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/index.rb:89:in `block in build_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/caching.rb:19:in `cache_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/index.rb:88:in `build_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:163:in `find_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/index.rb:56:in `find_asset'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/actionpack-3.2.3/lib/sprockets/static_compiler.rb:20:in `block in compile'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:212:in `block in each_logical_path'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:200:in `block (2 levels) in each_file'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:190:in `each'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:190:in `each_entry'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:198:in `block in each_file'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:197:in `each'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:197:in `each_file'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/sprockets-2.1.2/lib/sprockets/base.rb:210:in `each_logical_path'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/actionpack-3.2.3/lib/sprockets/static_compiler.rb:18:in `compile'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/actionpack-3.2.3/lib/sprockets/assets.rake:56:in `internal_precompile'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/actionpack-3.2.3/lib/sprockets/assets.rake:70:in `block (3 levels) in <top
(required)>'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/Roseboom/.rvm/rubies/ruby-1.9.3-p125/lib64/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/actionpack-3.2.3/lib/sprockets/assets.rake:60:in `block (3 levels) in <top
(required)>'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/Roseboom/.rvm/rubies/ruby-1.9.3-p125/lib64/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `load'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile:primary
rake aborted!
Command failed with status (1): [/home/Roseboom/.rvm/rubies/ruby-1.9.3-p125...]
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/file_utils.rb:80:in `ruby'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/actionpack-3.2.3/lib/sprockets/assets.rake:12:in `ruby_rake_task'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/actionpack-3.2.3/lib/sprockets/assets.rake:21:in `invoke_or_reboot_rake_task'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/actionpack-3.2.3/lib/sprockets/assets.rake:29:in `block (2 levels) in <top
(required)>'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/home/Roseboom/.rvm/rubies/ruby-1.9.3-p125/lib64/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `load'
/home/Roseboom/.rvm/gems/ruby-1.9.3-p125/bin/rake:19:in `<main>'
Tasks: TOP => assets:precompile
Try to change execjs to therubyracer gem. I had so many problems with execjs before i switched to rubyracer. Now all works.
group :assets do
gem 'sass'
gem 'coffee-script'
gem 'uglifier'
gem 'therubyracer'
end
Cheers!
In my case it was because I used a wrong version of Ruby. Remember to double-check the Ruby version of your project
I'm new in Rails development and this is my first deployment to Heroku.
When I execute my application (after the deployment) there is an error:
2011-09-18T21:05:54+00:00 app[web.1]: Completed 500 Internal Server Error in 10ms
2011-09-18T21:05:54+00:00 app[web.1]:
2011-09-18T21:05:54+00:00 app[web.1]: ActionView::Template::Error (application.css isn't precompiled):
I googled this and found that I have to precompile my assets, but when trying to do this I found an other error:
$ bundle exec rake assets:precompile RAILS_ENV=production
rake aborted!
No such process - /usr/lib/ruby/gems/1.8/gems/pg-0.11.0/lib/pg_ext.so
(See full trace by running task with --trace)
I haven't found any solution for this issue. Is there anyone who faced this an know how to solve this problem?
I ran into this issue as well and I resolved it by doing the following:
Open up config/environments/production.rb and make sure the following option is set to true:
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
Then run:
rake assets:precompile --trace RAILS_ENV=production
Hope this helps!
~Kevin
I got the problem too. But you can
rake assets:precompile RAILS_ENV=production
in local, and push to heroku with public/assets. It's resolved.
I would recommend to use the new Cedar stack. It precompiles assets for you on deploy and overall plays nicer with Rails 3.1, although you will need to configure your app a little bit to work: add some gems to your Gemfile and create a Procfile. But it is still an easier way to go.
Oh, this is an easy one. Your PG gem is breaking your rake task. You can either go the long route to try to fix it, or you can try commenting it out from your gemfile in order to run the precompile.
Yes like Simpleton posted above the PG gem is causing the problem. Imo a better solution would be to move the PG gem inside production in your gemfile and run;
bundle install --without production
Then you should be able to run the rake task without problems
I had the same error message. My issue was an incorrectly specified font url.
The bulk of this answer shows how I figured it out.
Although I didn't get the path of the asset it was failing on when running
RAILS_ENV=production SECRET_KEY_BASE=xxx rake assets:precompile --trace
Instead I had this stack trace:
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:283:in `sprockets_context'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:124:in `asset_path'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:142:in `asset_url'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:214:in `font_url'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/script/tree/funcall.rb:143:in `_perform'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/script/tree/node.rb:58:in `perform'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/script/tree/list_literal.rb:63:in `block in _perform'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/script/tree/list_literal.rb:63:in `map'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/script/tree/list_literal.rb:63:in `_perform'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/script/tree/node.rb:58:in `perform'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:397:in `visit_prop'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/base.rb:36:in `visit'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:160:in `block in visit'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/stack.rb:79:in `block in with_base'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/stack.rb:115:in `with_frame'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/stack.rb:79:in `with_base'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:160:in `visit'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:433:in `block (2 levels) in visit_rule'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:433:in `map'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:433:in `block in visit_rule'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:181:in `with_environment'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:431:in `visit_rule'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/base.rb:36:in `visit'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:160:in `block in visit'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/stack.rb:79:in `block in with_base'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/stack.rb:115:in `with_frame'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/stack.rb:79:in `with_base'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:160:in `visit'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/base.rb:52:in `map'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/base.rb:52:in `visit_children'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:169:in `block in visit_children'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:181:in `with_environment'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:168:in `visit_children'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/base.rb:36:in `block in visit'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:188:in `visit_root'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/base.rb:36:in `visit'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:159:in `visit'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/visitors/perform.rb:8:in `visit'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/root_node.rb:36:in `css_tree'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/tree/root_node.rb:20:in `render'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sass-3.4.22/lib/sass/engine.rb:281:in `render'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/sass_compressor.rb:48:in `call'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/sass_compressor.rb:28:in `call'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/loader.rb:60:in `block in load'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/loader.rb:44:in `load'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:47:in `load'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/base.rb:66:in `find_asset'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:142:in `block in find'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:209:in `each'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:209:in `stat_directory'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:227:in `stat_tree'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:105:in `each'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:104:in `each'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:104:in `logical_paths'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:140:in `find'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:185:in `compile'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-rails-3.1.1/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/rake/sprocketstask.rb:147:in `with_logger'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-rails-3.1.1/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/task.rb:248:in `block in execute'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/task.rb:243:in `each'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/task.rb:243:in `execute'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/task.rb:187:in `block in invoke_with_call_chain'
/Users/smithd98/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/task.rb:180:in `invoke_with_call_chain'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/task.rb:173:in `invoke'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/application.rb:152:in `invoke_task'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/application.rb:108:in `block (2 levels) in top_level'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/application.rb:108:in `each'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/application.rb:108:in `block in top_level'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/application.rb:117:in `run_with_threads'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/application.rb:102:in `top_level'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/application.rb:80:in `block in run'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/application.rb:178:in `standard_exception_handling'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/lib/rake/application.rb:77:in `run'
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/rake-11.2.2/exe/rake:27:in `<top (required)>'
/Users/smithd98/.rvm/gems/ruby-2.3.1/bin/rake:23:in `load'
/Users/smithd98/.rvm/gems/ruby-2.3.1/bin/rake:23:in `<main>'
/Users/smithd98/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `eval'
/Users/smithd98/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in `<main>'
I modified the gem to spit out the filename
subl /Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:124:in
like this
def asset_path(path, options = {})
path = path.value
puts path
puts '123'
path, _, query, fragment = URI.split(path)[5..8]
puts '126'
path = sprockets_context.asset_path(path, options)
puts '128'
query = "?#{query}" if query
puts '130'
fragment = "##{fragment}" if fragment
puts '132'
Autoload::Sass::Script::String.new("#{path}#{query}#{fragment}", :string)
end
Then when I ran
RAILS_ENV=production SECRET_KEY_BASE=xxx rake assets:precompile --trace
I got
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
fonts/OpenSans-Light.ttf
123
126
rake aborted!
NoMethodError: undefined method `[]' for nil:NilClass
/Users/smithd98/.rvm/gems/ruby-2.3.1/gems/sprockets-3.7.0/lib/sprockets/sass_processor.rb:283:in `sprockets_context'
...the rest of the stack trace is the same...
Then I found out the issue was a font had been specified like this:
.btn-rect {
font-family: 'OpenSans-Light';
src:font-url('fonts/OpenSans-Light.ttf') format('truetype');
}
and should have been like this:
.btn-rect {
font-family: 'OpenSans-Light';
}
Instead of config.assets.compile = true use config.serve_static_assets = true
The first option is incorrect, because it tells your server to go back to serving the app/assets folder.