-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helper for asset pipeline "image-tag" renders /images instead of /assets urls #57
Comments
If this change is deliberate, then the docs should be updated to reflect:
|
something in your setup must be outdated im using these in a fresh 3.1 app and im getting the desired results try not using it from git |
Wasn't able to run the tests due to missing 3.2.0.beta gem on 'bundle install', but the following test specifies the correct expected result (/assets/rails.png) and should fail if run. sass_rails_test.rb:
|
According to jose, this was fixed as well in the latest commit to 3-1-stable, so closing this. Must still be using a slightly older commit. |
Wish I could specify a :commit => '64d7878bc8aacf236f3b4e36f0a07d5955a76230' in bundle, since latest commit doesn't have a special branch. Would be great to lock down on this until the next 3.1.x release. |
@avocade use 3-1-stable branch the fix is there |
Using it, still get same issue. But it's obviously a caching issue somewhere (gem or sass), so no worries. Much appreciated! |
Try with |
First thing I tried :) Also cleared .sass-cache. And cleared the Chrome cache. Thanks for the suggestions, though! |
some sass-rails work is needed. More info: rails/rails#3126 (comment) |
The image_tag helper is working fine with the specified commit but I encounter a very strange issue with |
Still getting the same bug as Sush here, cleared all caches (including browser), double-checking with curl but still getting same /image/image.png urls... |
I'm not sure if it's related, but I had a project not using |
My project is using |
I have the same issue. asset-url("foo.bar", image) -> resolves to "url(/assets/foo.bar)" I'm using rails 3.1.0 and sass-rails 3.1.0 |
Can you guys test using Rails 3-1-stable and sass-rails 3-1-stable branches?. |
It works ! Thanks a lot :) |
Great, works fine now. Thanks Santiago! |
Pretty sure this is intentional. Long lived links (like in an email) need to avoid digest-based URLs. Hunt & pecked on my iPhone... Sorry if it's brief! On Sep 29, 2011, at 7:05 AM, Oskar Lissheim-Boethiusreply@reply.github.com wrote:
|
@chriseppstein I thought long lived asset references (ex. email) is actually an example why digest-based urls are good/ needed. So html, css and images all match the same version. So if you have long lived stuff, just don't clean up the assets folder. Or enhance the assets rake task, so that you can pass a timestamp, so only assets older than xxx days are removed. |
Good point about the email, just didn't see these being generated before in 3.1.0 and earlier 3-1-stable commits. That's why I was wondering if this was a new bug introduced with the latest changes. |
Have same issue after updating from rails 3.1.1.rc4 to 3.1.1. After investigating found gem sass-rails with 3.1.0rc4 version. After updating to sass-rails to 3.1.4 all became work well. |
This still does not work for me even with rails 3.1 and sass-rails 3.1.4 asset-url('foo.png', image) # /assets/foo.png |
@assembler do you have compass installed? If so, what version? |
Yes I do.. 0.11.5 |
Here is my complete gemfile
|
After upgrading from Rails 3.1.0, where everything was working, I now run into the same problem (image-url not working, asset-url is). I made a full I was a bit confused, because I am not using Compass in this project, with which the error occured before. So I appended my complete Gemfile.lock, maybe it is helping for tracing down this bug. https://gist.github.com/1308971 UPDATE: Forget about it, I used |
I am hitting this bug with the following latest gems:
I also made sure to test with caches cleared @chriseppstein should this be reopened? |
@chriseppstein: after removing tmp/cache/assets in addition to sass caches it's working again |
Having the same issue here :/ |
Same issue in Rails 3.1.3. A downgrade to Rails 3.1.1 worked for me. |
Using latest sass-rails and rails from edge 5.minutes.ago:
With latest rails 3-1-stable commit by santiago, image_tag in erb views now works fine, renders /assets/ instead of /images again as in 3.1.0.
But "image-tag('image.png')" in sass and scss still returns /images/image.png instead of /assets/image.png.
The text was updated successfully, but these errors were encountered: