RailsPanel is a Chrome extension for Rails development that will end your tailing of development.log. Have all information about your Rails app requests in the browser - in the Developer Tools panel. Provides insight to db/rendering/total times, parameter list, rendered views and more.
To use this extension you need to add meta_request gem to your app's Gemfile:
group :development do
gem 'meta_request'
end
Install RailsPanel extension from the Chrome WebStore. This is recommended way of installing extension, since it will auto-update on every new version. Note that you still need to update meta_request gem yourself.
If you have a problem installing extension from Chrome Store or just want to run latest and hack on it, just clone the repo (say under /workspace/rails_panel) and in "Developer mode" Chrome Extensions page select "Load Unpacked extension..." and select "/workspace/rails_panel/rails_panel".
- Rails 3, Rails 4, Rails 5
- Ruby 1.9.3, Ruby 2.0, Ruby 2.1, Ruby 2.2, Ruby 2.3
Select your editor on the extension options page: chrome://extensions. Following editors are supported:
- MacVim
- TextMate
- Sublime
- Emacs
- Atom
- RubyMine
If you're using LiveReload or Rack::LiveReload make sure to exclude watching your tmp/ folder because meta_request writes a lot of data there and your browser will refresh like a madman.
You can clear the panel with the usual shortcuts of ⌘+k or ctrl+l.
If you do not want to enable meta_request every time you start the server you can put it like this in your app's Gemfile:
group :development do
gem 'meta_request', require: false
end
Then create an initializer that determines the condition to initialize meta_request:
# In `config/initializers/benchmarking.rb` (for example)
if ENV['USE_RAILS_PANEL']
require 'meta_request'
# Initialize manually since we skipped it in the Gemfile
MetaRequest::initialize!(Rails.application)
end
This way you can turn meta_request on and off through environment variables. This is useful for projects with different people or when you don't need it every time you work on your app.
Copyright (c) 2012 Dejan Simic
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.