Code Monkey home page Code Monkey logo

Comments (5)

rosswilson avatar rosswilson commented on June 25, 2024

Confirmed this a little more by renaming the resource route in my routes.rb file as follows:

From:

resources :assets

To:

resources :assets, :path => "stuff"

Visiting /stuff/12 MiniProfiler displays. This suggests that the route /assets/something causes MiniProfiler not to display.

from rack-mini-profiler.

rosswilson avatar rosswilson commented on June 25, 2024

It seems that in commit 5113405 we are hard coding that a "/assets/" path should be skipped. This assumes that a developer hasn't changed the Asset Pipeline prefix like I've done.

Could we change this line to check what the configured config.assets.prefix setting is and skip that instead?

from rack-mini-profiler.

SamSaffron avatar SamSaffron commented on June 25, 2024

sure I am fine with a change in this department, can you send a PR

On Tue, Sep 17, 2013 at 8:31 AM, Ross Wilson [email protected]:

It seems that in commit 511340551134053a41cdf3dd0aedc4273bc1ed06e34962awe are hard coding that a "/assets/" path should be skipped. This assumes
that a developer hasn't changed the Asset Pipeline prefix like I've done.

Could we change this line to check what the configured
config.assets.prefix setting is and skip that instead?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-24550220
.

from rack-mini-profiler.

SamSaffron avatar SamSaffron commented on June 25, 2024

thanks!

from rack-mini-profiler.

sqbell avatar sqbell commented on June 25, 2024

This change however is not backwards compatible with Rails 3.0, as there is no assets method for #<Rails::Application::Configuration:0x00000006d439a0>. Here is the error I keep getting:

/home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/railtie/configuration.rb:77:in `method_missing': undefined method `assets' for #<Rails::Application::Configuration:0x00000006d439a0> (NoMethodError)
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/bundler/gems/rack-mini-profiler-7bbd53b0ceb2/lib/mini_profiler_rails/railtie.rb:17:in `initialize!'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/bundler/gems/rack-mini-profiler-7bbd53b0ceb2/lib/mini_profiler_rails/railtie.rb:52:in `block in <class:Railtie>'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/initializable.rb:25:in `instance_exec'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/initializable.rb:25:in `run'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/initializable.rb:50:in `block in run_initializers'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/initializable.rb:49:in `each'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/initializable.rb:49:in `run_initializers'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/application.rb:134:in `initialize!'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/application.rb:77:in `method_missing'
    from /home/vagrant/Workspace/Repositories/agentstream/trunk/config/environment.rb:5:in `<top (required)>'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `block in require'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `block in load_dependency'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:597:in `new_constants_in'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/activesupport-3.0.20/lib/active_support/dependencies.rb:242:in `require'
    from /home/vagrant/Workspace/Repositories/agentstream/trunk/config.ru:6:in `block in <main>'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/rack-1.2.8/lib/rack/builder.rb:46:in `instance_eval'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/rack-1.2.8/lib/rack/builder.rb:46:in `initialize'
    from /home/vagrant/Workspace/Repositories/agentstream/trunk/config.ru:1:in `new'
    from /home/vagrant/Workspace/Repositories/agentstream/trunk/config.ru:1:in `<main>'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/rack-1.2.8/lib/rack/builder.rb:35:in `eval'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/rack-1.2.8/lib/rack/builder.rb:35:in `parse_file'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/rack-1.2.8/lib/rack/server.rb:162:in `app'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/rack-1.2.8/lib/rack/server.rb:253:in `wrapped_app'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/rack-1.2.8/lib/rack/server.rb:204:in `start'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/commands/server.rb:65:in `start'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/commands.rb:30:in `block in <top (required)>'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/commands.rb:27:in `tap'
    from /home/vagrant/.rvm/gems/ruby-2.0.0-p353@200_agentstream/gems/railties-3.0.20/lib/rails/commands.rb:27:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

from rack-mini-profiler.

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.