Comments (16)
Can you post an app or steps about how to reproduce that?
from sass-rails.
Sorry, I found a "solution": #22
I enabled asset pipelining.
thedarkone@a6b8eb9 - this should have fixed it.
from sass-rails.
Don't know why this is closed, this exception is still thrown in 3.1.3
config.assets.enabled = false
and you can see it fail.
from sass-rails.
SOME ONE RE-OPEN THIS NOW
Yeah, he's correct. That does not fix the problem. It still pops up. If you're using rails 3.1.0 and not utilizing assets, you're going to run into problems. Even 3.1.3 still produces these issues. The above "solution" provided is not a solution.
This must be true. It can not be false. If you don't put this code into your application.rb the error will still happen.
config.assets.enabled = false
If you run command rails s it will provide the following error
/Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.1.0/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `context_class' for nil:NilClass (NoMethodError)
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/sass-rails-3.1.5/lib/sass/rails/railtie.rb:61:in `block in <class:Railtie>'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `run'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/initializable.rb:50:in `block in run_initializers'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `each'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `run_initializers'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/application.rb:92:in `initialize!'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/newdark/apps/cardbuilder/config/environment.rb:5:in `<top (required)>'
from /Users/newdark/apps/cardbuilder/config.ru:4:in `require'
from /Users/newdark/apps/cardbuilder/config.ru:4:in `block in <main>'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/builder.rb:51:in `instance_eval'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/builder.rb:51:in `initialize'
from /Users/newdark/apps/cardbuilder/config.ru:1:in `new'
from /Users/newdark/apps/cardbuilder/config.ru:1:in `<main>'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/builder.rb:40:in `eval'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/builder.rb:40:in `parse_file'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/server.rb:200:in `app'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands/server.rb:46:in `app'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/server.rb:301:in `wrapped_app'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.5/lib/rack/server.rb:252:in `start'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands/server.rb:70:in `start'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands.rb:54:in `block in <top (required)>'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands.rb:49:in `tap'
from /Users/newdark/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands.rb:49:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
from sass-rails.
Fixed.
from sass-rails.
Can't find this fix. Does sass-rails master even work for Rails 3.1?
from sass-rails.
yeah it works it just kinda hard to understand. I would read threw the source code if you really wanted to know what the gem does.
from sass-rails.
Had the same problem, upgraded from rails 3.1.0 to 3.1.3, yet it was still recurring.
Josevalim's fix worked perfectly: 636f668
from sass-rails.
Works, thanks! Will there be a sass-rails 3.1.6 release?
from sass-rails.
oh really cool hope that fix a lot of asset problems. There seams to be a lot right now.
from sass-rails.
Yeah that would fix it as well. After all it is that gem that is causing that error and if you are telling it false then you are trying to tell the system that you don't want to use that gem but don't want to do a bundle install. To be real about it if you ever set that to false it is because you are not using assets.
from sass-rails.
Not total sure what you are talking about but what I'm guessing we are talking about is sass(http://sass-lang.com/) which is built to make style sheets a bit more dynamic.
Have not really used the features a lot my self but it is still nice to have when you are building a very dynamic site because you don't know when you might need to do basic math in a style sheet or a color you use all of the time.
So what I am going to say is that I don't believe the iphone is the exclusive user of this tech.
from sass-rails.
Using Rails 3.1.5 and activeadmin 0.4.4
Rails loads and works find while using sass-rails 3.1.3
But fails as before using sass-rails 3.1.6
$ rake routes
rake aborted!
undefined method `context_class' for nil:NilClass
So my solution is to stay on sass-rails 3.1.3, until I can move my whole project to the asset-pipeline
from sass-rails.
Same problem here, "solved" it going back to sass-rails 3.1.3 ; will really solve it upgrading to from Rails 3.1.6 to 3.2.x and activating the asset pipeline ^^
from sass-rails.
This still is happening on the latest 3-1-stable:
NoMethodError on line ["66"] of /home/kelly/.rvm/gems/ruby-1.9.2-p180/bundler/gems/sass-rails-aa609d23d312/lib/sass/rails/railtie.rb: undefined method `context_class' for nil:NilClass
from sass-rails.
Still happening for me as well.
from sass-rails.
Related Issues (20)
- Where is your ChangeLog? HOT 2
- url imports aren't loaded in 6.0 HOT 1
- On Windows search for libsass.so instead of libsass.dll HOT 2
- SassC::SyntaxError: Error: malformed URL HOT 1
- Post-install message about Ruby Sass end-of-life HOT 2
- bundle failed with gem 'sass-rails', '>= 6'
- Depends on sassc-rails? HOT 1
- Moving from import to use HOT 2
- Glob Imports Not Working HOT 1
- SassC::SyntaxError: Error: style declaration must contain a value issue with deploy on heroku server HOT 1
- error compiling assets with image-url tag HOT 1
- Modern color syntax HOT 5
- var(--tw-empty,/*!*/ /*!*/) wrongly processed
- Switch to embedded dart-sass? HOT 4
- Segmentation fault error when precompiling assets HOT 2
- [ARM64] Creating Rails 6.1.5 app in JRuby 9.3.3.0 fails due to sass-rails relying on C library HOT 2
- Error in production mode on RoR 7.0.3.1 with Bootstrap 5.2
- Installation fails on Windows/Jruby 9.3.9.0 HOT 2
- Scss suffixes is not working
- Swap from `sassc-rails` to `dartsass-rails`? Or Deprecate this gem entirely? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sass-rails.