Comments (7)
Sounds like a great idea. Do you have the chance to try it out and create a pull request?
from sinatra-asset-pipeline.
However, after giving it some more thought it only raises an exception in the development environment as all assets are served via the default Sinatra public folder in production. Do you still think we need the if statement?
from sinatra-asset-pipeline.
It's a very minor detail that I only noticed because I was migrating an app from rake-pipeline to this and some of our previous urls were displaying this error instead of 404'ing (or something else to tell me that the asset didn't exist). It took me a while to figure out that I had a path mis-configured.
With using sprockets-helpers you shouldn't ever be able to generate a URL to an asset that doesn't exist, so in theory it wouldn't matter too much. Only use case I could come up with is if an implementer needed their sinatra app to handle certain urls that began with "/assets" ... maybe like if they wanted to use sinatra to dynamically serve a user profile photo - "/assets/user/:id" or something. If it means anything, I think Sprocket's built-in rack middleware passes if it comes across an asset that doesn't exist, but I could be wrong.
If you think it's relevant enough to issue a PR I'll do so and test it out.
from sinatra-asset-pipeline.
Got it, I would love a pull request!
from sinatra-asset-pipeline.
Closing this issue, please reopen it if you find the time to make a pull request.
from sinatra-asset-pipeline.
I think this could still be useful, even if it were just a more explicit error message, saying which asset it was trying to find.
from sinatra-asset-pipeline.
I agree, a friend of mine using this library just ran into the same problem the other day, so I think that we should reopen this, do some work and get this feature in.
from sinatra-asset-pipeline.
Related Issues (20)
- Opal issues. HOT 4
- No minification in staging environment HOT 4
- Assets aren't precompiled when running precompile task or deploying to Heroku HOT 4
- Asset folders not found if app is mounted in a different directory HOT 3
- In development and test, store_location is polluted with asset paths, instead of last REST route HOT 4
- Can't make the link between precompiled' assets HOT 4
- Usage with classic Sinatra style HOT 3
- Documenation Enhancement Regarding assets_protocol HOT 2
- Why assets_host works on production environment only? HOT 2
- Support for precompiling relative URL root HOT 3
- Sprockets 3.x support HOT 16
- Unable to get assets to serve in production HOT 1
- Using absolute path in assets_prefix array HOT 1
- Basic readme config doesn't generate any resources HOT 8
- Assets not loaded HOT 2
- Testing with Ruby 2.4, Sinatra 2.0 beta2, Rake, Sprockets gems also were updated HOT 4
- Assets Doesn't load when upgraded from Ruby 1.9.3 to Ruby 2.4.3 HOT 1
- NameError: uninitialized constant Sinatra::Sprockets::Manifest when precompiling assets HOT 1
- Asset pipeline does not support assets_paths to third party assets (from gems)
- Investigate/Update for Sprockets 4 HOT 2
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 sinatra-asset-pipeline.