Giter Club home page Giter Club logo

Comments (15)

jhilden avatar jhilden commented on July 28, 2024

Hey Brad,

I don't really know why the split_stylesheet_link_tag helper for some reason isn't loaded/available in your app. It is defined here: https://github.com/zweilove/css_splitter/blob/master/app/helpers/css_splitter/application_helper.rb and loaded here: https://github.com/zweilove/css_splitter/blob/master/lib/css_splitter/engine.rb#L9-L13 I have to dig a little deeper to figure out what could be wrong here.

As a workaround/quickfix I would recommend you simply do the include yourself, manually writing the code that the helper would produce. Something like this:

= stylesheet_link_tag "application", :media => "all"
/[if IE lte IE 9]
  = stylesheet_link_tag "application_split2", :media => "all"

Let me know if that works for you in the meantime and I will get back to you once I know more about why the helper could not be loaded.

from css_splitter.

bkahl avatar bkahl commented on July 28, 2024

thanks, i already tried that.

i think the current project im working on now is more then that because i
found a counter to count my selectors and its less then 4095 so the
css_splitter shouldn't even be a factor, im thinking the css isn't loading
in ie9 properly due to either the bootstrap sass gem overwriting some of
the predefined styles.

we ended up getting control of a project from our outsourced team and they
totally botched this project up so im trying to run through the entire
pipeline.

i even tried bless just as a second potential option but neither have
worked which is why i think it has something to do with the bootstrap gem
itself, your really supposed to predefine some of your default elements
before the bootstrap gem to prevent the bootstrap from overwriting some of
your styles but that isn't what the previous owners of this project did.

ehhh.... this has been kind of frustrating and ive been dealing with it for
the last 2 days.

but i don't think it has anything to do with your gem.

thanks for your help.

have a good weekend.

brad

On Fri, Mar 15, 2013 at 5:28 PM, Jakob Hilden [email protected]:

Hey Brad,

I don't really know why the split_stylesheet_link_tag helper for some
reason isn't loaded/available in your app. It is defined here:
https://github.com/zweilove/css_splitter/blob/master/app/helpers/css_splitter/application_helper.rband loaded here:
https://github.com/zweilove/css_splitter/blob/master/lib/css_splitter/engine.rb#L9-L13I have to dig a little deeper to figure out what could be wrong here.

As a workaround/quickfix I would recommend you simply do the include
yourself, manually writing the code that the helper would produce.
Something like this:

= stylesheet_link_tag "application", :media => "all"
/[if IE lte IE 9]
= stylesheet_link_tag "application_split2", :media => "all"

Let me know if that works for you in the meantime and I will get back to
you once I know more about why the helper could not be loaded.


Reply to this email directly or view it on GitHubhttps://github.com//issues/11#issuecomment-14985903
.

Thanks,

Brad Kahl
Software Developer
M 540.314.8352

from css_splitter.

linjunpop avatar linjunpop commented on July 28, 2024

@bkahl Did you put this gem in the assets group in your Gemfile? If I do that, I get the same problem.

It works for me to move this gem out of assets group.

from css_splitter.

jhilden avatar jhilden commented on July 28, 2024

@linjunpop That's a very good point. I added a little note to the README. Do you think that will make things more clear? ecde6b0

@bkahl Please let us know if that fixed your problem.

from css_splitter.

jhilden avatar jhilden commented on July 28, 2024

@bkahl any feedback? Can this issue be closed?

from css_splitter.

bkahl avatar bkahl commented on July 28, 2024

hey @jhilden, sorry for the late response and not closing this out, but yes, this issue is solved, therefore, I'm closing it out. thanks for your help!

from css_splitter.

bowd avatar bowd commented on July 28, 2024

@bkahl can you confirm that the issue cam from having the gem in the assets group? I've suddenly hit this (after 3 weeks of having it in production, working) on a branch where I've added active-admin. I'm still investigating but It would be nice to know if your problem was different as well and how you fixed it. Thanks.

from css_splitter.

jhilden avatar jhilden commented on July 28, 2024

Don't really know what the issue could be here, but from personal experience I would recommend rails_admin over active_admin. Maybe that won't give you any issues.

from css_splitter.

muskosan avatar muskosan commented on July 28, 2024

I'm running into this same issue, with the gem outside the assets group

from css_splitter.

jhilden avatar jhilden commented on July 28, 2024

@muskosan can you provide some more details on used versions (gem, rails, ruby, ...), error messages, etc.?

from css_splitter.

muskosan avatar muskosan commented on July 28, 2024

Sure,

Error:
undefined method `split_stylesheet_link_tag' for #<#Class:0x007fe20d023a40:0x007fe2069c42b8>

gem v .0.4.0.
Rails 3.2.19
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin13.0]

Using the helper isn't a necessity, though it would be nice.

from css_splitter.

jhilden avatar jhilden commented on July 28, 2024

hmm. seems like this part is not working for you: https://github.com/zweilove/css_splitter/blob/master/lib/css_splitter/engine.rb#L9-L13
(maybe it's not working for rails3)

you can always include the helper manually in your ApplicationController

from css_splitter.

kaliara avatar kaliara commented on July 28, 2024

I found that when using Pow as my local Rack server, I had to restart it to get this error to go away.

from css_splitter.

jefigo avatar jefigo commented on July 28, 2024

I had the same issue running on ruby 2.2.2p95 and Rails 4.2.3 application.
I had to include helper CssSplitter::ApplicationHelper in the ApplicationController and that worked for me.

from css_splitter.

constantm avatar constantm commented on July 28, 2024

Thanks @jefigo, thank did the trick! For me this is caused by using the ember-cli-rails gem. When I remove the gem, it works fine.

from css_splitter.

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.