Giter Site home page Giter Site logo

Comments (9)

mattbrictson avatar mattbrictson commented on July 22, 2024

The xray-rails gem is supposed to automatically inject its JavaScript file into the response. It does this with a middleware that parses the response, finds where jQuery is being included, and inserts its JavaScript after that.

This process is automatic and solves the deployment issues you mentioned, but it the parse+insert step is a bit brittle. If your jQuery isn't in a file called "jquery", for example, that may be the problem. Or you might have found a bug.

Maybe you could paste the HTML source of your app's <head> that gets sent to the browser and we can figure out why xray-rails is failing to find jQuery and perform the insertion of its own JS.

from xray-rails.

nextekcarl avatar nextekcarl commented on July 22, 2024

I'm actually using jQuery2, so maybe that's the problem?

<script src="/assets/jquery2.self-a4777c1acac0a74340755725342901a54ed000955bf6f5320491b8b2514c86ec.js?body=1"></script>
<script src="/assets/jquery_ujs.self-d456baa54c1fa6be2ec3711f0a72ddf7a5b2f34a6b4f515f33767d6207b7d4b3.js?body=1"></script>
<script src="/assets/jquery.countdown.min.self-7438de4717ee05bd2b2f56a30b1d4ff0bc562b031fd81fa80253457e8f761da1.js?body=1"></script>
<script src="/assets/jquery.singlePageNav.min.self-ea7214737c231c2754a39e74273816eda7a80f80dd4277402cb93c2cbd3646b8.js?body=1"></script>
<script src="/assets/jquery.superslides.min.self-0b5e8d70f7de04e5d1ed2a3410f03d73e5758a8707e120c0aece5af80a05eff6.js?body=1"></script>
<script src="/assets/custom.self-1c9050b98e5c346281862204a740128f39a823a92fad41816610ff35123f454a.js?body=1"></script>
<script src="/assets/wow.min.self-0d561dc583d8790bbe0d603b2f35c0021c14803d47ad8439b743a4d799821d1d.js?body=1"></script>
<script src="/assets/d3.self-8689d534a532bc8db6847d6391ca254ba3955aa7fb9499442b0986738a066574.js?body=1"></script>
<script src="/assets/registration.self-85db92e3836c9b18e766b352296e8cafa64f0e1505c4e2f2911b7238eb16022a.js?body=1"></script>
<script `src="/assets/application.self-16c207b3ca1b52afcfc7f4b662487caf1bbe084a6656bb15f693ab9de2d11be7.js?body=1"></script>

Originally, after reading your comment, I thought it was that I'm including most of my javascripts outside of the head, at the end of my page, for performance reasons, but even after making this change it still isn't working, so I'm think it doesn't look for jQuery2.js?

from xray-rails.

mattbrictson avatar mattbrictson commented on July 22, 2024

Agreed, it probably is because xray-rails isn't looking for jQuery2.js.

from xray-rails.

nextekcarl avatar nextekcarl commented on July 22, 2024

Is this something you plan on adding? I can't be the only one using jQuery2, can I?

from xray-rails.

mattbrictson avatar mattbrictson commented on July 22, 2024

I'm sure the maintainers of the project would accept a PR if you're willing to submit one. I'm just a fellow user of xray-rails that is trying to help as best I can.

from xray-rails.

nextekcarl avatar nextekcarl commented on July 22, 2024

Ha, you were so helpful I assumed you were a maintainer. I'll get right on that, @mattbrictson

from xray-rails.

mattbrictson avatar mattbrictson commented on July 22, 2024

Fixed by #65

from xray-rails.

mattbrictson avatar mattbrictson commented on July 22, 2024

Ha, you were so helpful I assumed you were a maintainer.

I am now (as of this week). 😄

from xray-rails.

nextekcarl avatar nextekcarl commented on July 22, 2024

Ha, I just reread this issue and was getting really confused. Great news.

from xray-rails.

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.