Comments (5)
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.
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.
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.
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.
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)
- Typescript doesn't resolve properly the dynamic routes module HOT 5
- No default export in Typescript definitions file HOT 2
- Automatic updates via rack middleware HOT 5
- Prefer default_url_options over implictly filling with params when passing options hash HOT 2
- module_type: nil causes "NIL is not supported by runtime" HOT 4
- Thoughts for using with webpacker within a Rails engine HOT 2
- Task not found in Rails 7 app HOT 9
- Custom output path HOT 8
- Custom output path HOT 2
- module_type: nil causes "NIL is not supported by runtime" HOT 8
- NameError: uninitialized constant JsRoutes::JsRoute HOT 6
- function to get all paths to do custom filtering and selecting? HOT 3
- Error: Cannot read config file: while running yarn lint HOT 3
- Upgrade `rake assets:precompile` to `update js-routes` files in Rakefile did not work for me HOT 13
- ESM Tree shaking not working because __jsr.r() is potentially impure HOT 3
- Use configured Webpacker directory instead of default
- Options style route params HOT 8
- Emoji caused URIError: URI malformed HOT 1
- Rails engine support: Engine configurations impact the main app HOT 2
- Bug: Prefix is ignored if a namespace is used 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 js-routes.