Comments (5)
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.
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.
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.
thanks!
from rack-mini-profiler.
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)
- Clicking "more" in speed badge causes an HTTP request, which doesn't work for HTTPS-only servers
- View previously captured flamegraphs
- Optionally (via config? keyboard shortcut?) show URL or controller action name in the badge itself
- "No snapshots exist" with snapshots enabled
- When `data-vertical-position` is `bottom`, then the popup is not positioned correctly
- always-async-flamegraph mode HOT 1
- Question: Support for tracing forked processes HOT 2
- Display row counts in the UI
- Latest release has an issue ...undefined local variable or method `query_string' HOT 2
- Deprecation warning with Rack >= 3.0.0 - Rack::File is deprecated and will be removed in Rack 3.1
- PRs for dotnet not being handled HOT 1
- "Display name in badge" commit accidentally affects SQL table number alignment
- Compliance with Rack : Spec 3. Lower-case HTTP Headers
- `alias_method': undefined method HOT 8
- MiniProfiler storage failure: can't modify frozen HOT 2
- Badge no longer displays after Turbo Drive page load w/ Turbo 8 (even w/ enable_hotwire_turbo_drive_support = true) HOT 2
- Assets served from Rails deauthorizing client-side profiler
- SQL queries are not profiled for Non-Rails Applications if rails patch is not enabled HOT 1
- Incompabtibility with rack 3/warden/devise HOT 1
- Don't touch HTTP headers where possible HOT 1
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 rack-mini-profiler.