GithubHelp home page GithubHelp logo

Comments (5)

mjtko avatar mjtko commented on September 23, 2024

I'm not certain that it's safe to turn of auto-update in this environment. The trivial approach would be to only register the preprocessor if Rails.env.development? or something, though this would then break for those who wanted compilation to occur in production (ie. weren't using precompiled assets).

It seems that the preprocessor has to be registered before the assets pipeline is finalized - I'll have a look to see if I can work out where and how to hook this in during initialization.

from js-routes.

bogdan avatar bogdan commented on September 23, 2024

I am experiencing even more problem:

In recent Rails rc - 3.1.1.rc2 rake assets:precompile loads environment but doesn't initialize it. And seems it will bring even more serious problem.

http://weblog.rubyonrails.org/2011/9/29/ann-rails-3-1-1-rc2

from js-routes.

mjtko avatar mjtko commented on September 23, 2024

There is a problem with asset pipeline approach in production environment:

I was wondering why I hadn't seen this issue myself and it seems this is only the case if config.assets.compile is set to true in production. While this is an unusual configuration, I think it's still a use case that should be dealt with. I think we can set the initializer to run at a better point during rails initialization - now I've managed to reproduce the issue, I'll work up a solution. :)

In recent Rails rc - 3.1.1.rc2 rake assets:precompile loads environment but doesn't initialize it.

Indeed we should, again, be able to sort this out with some initializer magic. I'll look into this too.

And seems it will bring even more serious problem.

Anything specific you're concerned about?

from js-routes.

mjtko avatar mjtko commented on September 23, 2024

In recent Rails rc - 3.1.1.rc2 rake assets:precompile loads environment but doesn't initialize it.

Looking at the 3-1-stable branch, it seems that they've made the sprockets precompilation without loading an environment optional (I belive it was implemented to workaround some problem that Heroku users were experiencing). By default, in 3-1-stable, the behaviour is as before - load the full environment - so we should be ok. Phew. :)

I've got a fix for the initial issue, will submit a pull request later this European morning. :)

from js-routes.

mjtko avatar mjtko commented on September 23, 2024

Good morning @bogdan :-)

I've opened two pull requests with patches for the issues discussed in this ticket. Looks good under my test environments here - hopefully these should cover us under 3.1.1.rc3 and up. :)

Cheers,

Mark.

from js-routes.

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.