Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assets precompile error #4250

Closed
navinspm opened this issue Dec 23, 2015 · 6 comments
Closed

assets precompile error #4250

navinspm opened this issue Dec 23, 2015 · 6 comments

Comments

@navinspm
Copy link

I don't use Sass in my rails application, after adding active admin it adds sass as dependencie to my application. Now I run RAILS_ENV=production rake assets:precompile --trace , it throws the error
rake aborted! NoMethodError: undefined method [] for nil:NilClass
I am attaching my Gemlock file here. and this is my active_admin.css.scss file

@import "active_admin/mixins"; @import "active_admin/base";

GemfileLock.txt

@timoschilling
Copy link
Member

please provide the full output of RAILS_ENV=production rake assets:precompile --trace

@navinspm
Copy link
Author

RAILS_ENV=production rake assets:precompile --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
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/sass_processor.rb:278:in `sprockets_context'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/sass_processor.rb:124:in `asset_path'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/sass_processor.rb:137:in `asset_url'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/script/tree/funcall.rb:140:in `_perform'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/script/tree/node.rb:50:in `perform'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/script/tree/list_literal.rb:63:in `block in _perform'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/script/tree/list_literal.rb:63:in `map'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/script/tree/list_literal.rb:63:in `_perform'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/script/tree/node.rb:50:in `perform'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:395:in `visit_prop'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/base.rb:36:in `visit'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/stack.rb:79:in `block in with_base'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/stack.rb:115:in `with_frame'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/stack.rb:79:in `with_base'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:158:in `visit'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:431:in `block (2 levels) in visit_rule'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:431:in `map'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:431:in `block in visit_rule'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:429:in `visit_rule'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/base.rb:36:in `visit'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:158:in `block in visit'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/stack.rb:79:in `block in with_base'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/stack.rb:115:in `with_frame'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/stack.rb:79:in `with_base'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:158:in `visit'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/base.rb:52:in `map'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/base.rb:52:in `visit_children'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:167:in `block in visit_children'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:179:in `with_environment'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:166:in `visit_children'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/base.rb:36:in `block in visit'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:186:in `visit_root'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/base.rb:36:in `visit'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:157:in `visit'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/visitors/perform.rb:8:in `visit'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/root_node.rb:36:in `css_tree'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/tree/root_node.rb:20:in `render'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sass-3.4.20/lib/sass/engine.rb:278:in `render'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/sass_compressor.rb:48:in `call'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/sass_compressor.rb:28:in `call'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/loader.rb:60:in `block in load'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/loader.rb:318:in `fetch_asset_from_dependency_cache'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/loader.rb:44:in `load'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/cached_environment.rb:47:in `yield'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/cached_environment.rb:47:in `load'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/base.rb:66:in `find_asset'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/manifest.rb:130:in `block in find'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/manifest.rb:129:in `each'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/manifest.rb:129:in `find'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/sprockets/manifest.rb:162:in `compile'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-3.4.0/lib/rake/sprocketstask.rb:147:in `with_logger'
/home/navin/.rvm/gems/ruby-2.2.1/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:240:in `call'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:235:in `each'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:150:in `invoke_task'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in `block (2 levels) in top_level'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in `each'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:106:in `block in top_level'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:115:in `run_with_threads'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:100:in `top_level'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:78:in `block in run'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
/home/navin/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/rake/application.rb:75:in `run'
/home/navin/.rvm/rubies/ruby-2.2.1/bin/rake:33:in `<main>'
Tasks: TOP => assets:precompile

This is the full trace of RAILS_ENV=production rake assets:precompile --trace

@hsyntnc
Copy link

hsyntnc commented Oct 17, 2017

Hey, i'm having the same issue. How did u fix it?

@omarosama89
Copy link

@navinspm Why did you close the issue without sharing the solution?!

@voondo
Copy link

voondo commented Mar 23, 2018

@navinspm Yes, why ?

@jeremystoll
Copy link

Be sure you don't have Sassy CSS syntax in a simple .css file. Rename the file (eg: "potato.scss"), or move the sassy stuff elsewhere. That was my issue, anyway.

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

No branches or pull requests

6 participants