Giter Club home page Giter Club logo

Comments (8)

gazay avatar gazay commented on June 20, 2024

Hello, can you provide a little bit more information about your environment, because on new rails app with gon 3.0.2 and rabl and jbuilder I have normal assets path through helpers:

Gemfile

gem 'rails', '3.2.3'
gem 'rabl'
gem 'jbuilder'
gem 'gon', '3.0.2'

home/index.html.erb

<h1>Hello</h1>
<%= path_to_image('rails.png') %>

result - http://cl.ly/0N422w0R1m3w0v2N231d

from gon.

brian-mann avatar brian-mann commented on June 20, 2024

Thanks for responding so quickly... I'd be happy to do a bit more testing. I'm actually headed out of town in a few hours so I'll work on this the next time I get the chance.

from gon.

gazay avatar gazay commented on June 20, 2024

any updates?

from gon.

SokratisVidros avatar SokratisVidros commented on June 20, 2024

Same issue with gon-5.0.4 and rails-4.0.5.

from gon.

andrey-skat avatar andrey-skat commented on June 20, 2024

rails 4.2.4, gon 6.0.1 - same issue

I found that when gon calls for compute_asset_path it not enters in Sprockets::Rails::Helper#compute_asset_path but in ActionView::Helpers::AssetUrlHelper.compute_asset_path.

But when I pointed it to right method, it just not calculates asset_digest_path.

from gon.

taki avatar taki commented on June 20, 2024

I take a stub at this issue.

Gemfile

  --snip--
gem 'rails', '4.2.4'
gem 'gon', '6.0.1'
  --snip--

views/homes/index.html.erb

<h1>Hello</h1>
<%= compute_asset_path 'rails.png' %>

Below is result.

a

from gon.

taki avatar taki commented on June 20, 2024

I think that if you use sprockets, compute_asset_path calls Sprockets::Rails::Helper#compute_asset_path and if you do not use sprockets, compute_asset_path calls ActionView::Helpers::AssetUrlHelper#compute_asset_path.

References

from gon.

andrey-skat avatar andrey-skat commented on June 20, 2024

As I sad when it calls Sprockets it didn't calculate asset_digest_path.
In your stub you use .erb and not gon + jbuilder

from gon.

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.