Giter Club home page Giter Club logo

Comments (16)

spastorino avatar spastorino commented on May 12, 2024

Can you post an app or steps about how to reproduce that?

from sass-rails.

ochronus avatar ochronus commented on May 12, 2024

Sorry, I found a "solution": #22
I enabled asset pipelining.
thedarkone@a6b8eb9 - this should have fixed it.

from sass-rails.

rubypanther avatar rubypanther commented on May 12, 2024

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.

brand-it avatar brand-it commented on May 12, 2024

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.

josevalim avatar josevalim commented on May 12, 2024

Fixed.

from sass-rails.

rbq avatar rbq commented on May 12, 2024

Can't find this fix. Does sass-rails master even work for Rails 3.1?

from sass-rails.

brand-it avatar brand-it commented on May 12, 2024

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.

vinnyglennon avatar vinnyglennon commented on May 12, 2024

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.

rbq avatar rbq commented on May 12, 2024

Works, thanks! Will there be a sass-rails 3.1.6 release?

from sass-rails.

brand-it avatar brand-it commented on May 12, 2024

oh really cool hope that fix a lot of asset problems. There seams to be a lot right now.

from sass-rails.

brand-it avatar brand-it commented on May 12, 2024

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.

brand-it avatar brand-it commented on May 12, 2024

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.

mwindholtz avatar mwindholtz commented on May 12, 2024

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.

Bastes avatar Bastes commented on May 12, 2024

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.

kellydunn avatar kellydunn commented on May 12, 2024

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.

pelargir avatar pelargir commented on May 12, 2024

Still happening for me as well.

from sass-rails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.