https://github.com/rails/web-console
Rails Console on the Browser.
https://github.com/rails/web-console
Keywords from Contributors
activerecord activejob mvc rubygems rack ruby-gem rubocop gem code-formatter static-code-analysis
Last synced: about 4 hours ago
JSON representation
Repository metadata
Rails Console on the Browser.
- Host: GitHub
- URL: https://github.com/rails/web-console
- Owner: rails
- License: mit
- Fork: true (gsamokovarov/web-console)
- Created: 2013-08-30T21:57:37.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2026-02-23T19:32:06.000Z (8 days ago)
- Last Synced: 2026-02-24T02:03:19.273Z (8 days ago)
- Language: Ruby
- Homepage:
- Size: 1.05 MB
- Stars: 1,419
- Watchers: 36
- Forks: 177
- Open Issues: 14
- Releases: 0
-
Metadata Files:
- Readme: README.markdown
- Changelog: CHANGELOG.markdown
- License: MIT-LICENSE
README.markdown
Web Console 
Web Console is a debugging tool for your Ruby on Rails applications.
Installation
Add the following to your Gemfile:
group :development do
gem 'web-console'
end
Usage
The web console allows you to create an interactive Ruby session in your
browser. Those sessions are launched automatically in case of an error and can
also be launched manually in any page.
For example, calling console in a view will display a console in the current
page in the context of the view binding.
<% console %>
Calling console in a controller will result in a console in the context of
the controller action:
class PostsController < ApplicationController
def new
console
@post = Post.new
end
end
The method is defined in Kernel and you can invoke it any application code.
Only one console invocation per request is allowed. If you happen to
have multiple ones, WebConsole::DoubleRenderError will be raised.
Configuration
Web Console allows you to execute arbitrary code on the server. Therefore, be
very careful who you give access to.
config.web_console.permissions
By default, only requests coming from IPv4 and IPv6 localhosts are allowed.
config.web_console.permissions lets you control which IP's have access to
the console.
You can allow single IP's or whole networks. Say you want to share your
console with 192.168.0.100:
class Application < Rails::Application
config.web_console.permissions = '192.168.0.100'
end
If you want to allow the whole private network:
Rails.application.configure do
config.web_console.permissions = '192.168.0.0/16'
end
Take a note that IPv4 and IPv6 localhosts are always allowed. This wasn't the
case in 2.0.
config.web_console.whiny_requests
When a console cannot be shown for a given IP address or content type,
messages such as the following is printed in the server logs:
Cannot render console from 192.168.1.133! Allowed networks:
127.0.0.0/127.255.255.255, ::1
If you don't want to see this message anymore, set this option to false:
Rails.application.configure do
config.web_console.whiny_requests = false
end
config.web_console.template_paths
If you want to style the console yourself, then you can place style.css at a
directory pointed by config.web_console.template_paths:
Rails.application.configure do
config.web_console.template_paths = 'app/views/web_console'
end
You may want to check the templates folder at the source tree for the files you
may override.
config.web_console.mount_point
Usually the middleware of Web Console is mounted at /__web_console.
If there is a need to change the path, then you can specify it by
config.web_console.mount_point:
Rails.application.configure do
config.web_console.mount_point = '/path/to/web_console'
end
FAQ
Where did /console go?
The remote terminal emulator was extracted in its own gem which is no longer
bundled with Web Console.
If you miss this feature, check out rvt.
Why do I constantly get unavailable session errors?
All of Web Console sessions are stored in memory. If you happen to run on a
multi-process server (like Unicorn), you may encounter unavailable session errors
while the server is still running. This is because a request may hit a
different worker (process) that doesn't have the desired session in memory.
To avoid that, if you use such servers in development, configure them so they
serve requests only out of one process.
Passenger
Enable sticky sessions for Passenger on Nginx or Passenger on Apache to
prevent unavailable session errors.
How to inspect local and instance variables?
The interactive console executes Ruby code. Invoking instance_variables and
local_variables will give you what you want.
Why does the console only appear on error pages but not when I call it?
This can be happening if you are using Rack::Deflater. Be sure that
WebConsole::Middleware is used after Rack::Deflater. The easiest way to do
this is to insert Rack::Deflater as early as possible
Rails.application.configure do
config.middleware.insert(0, Rack::Deflater)
end
Why am I getting an undefined method web_console?
Make sure your configuration lives in config/environments/development.rb.
Credits
- Shoutout to Hailey Somerville for better_errors.
- Kudos to John Mair for binding_of_caller and debug_inspector.
- Thanks to Charles Oliver Nutter for all the JRuby feedback.
- Hugs and kisses to all of our contributors!
Owner metadata
- Name: Ruby on Rails
- Login: rails
- Email:
- Kind: organization
- Description:
- Website: https://rubyonrails.org/
- Location:
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/4223?v=4
- Repositories: 116
- Last ynced at: 2023-04-09T03:40:20.529Z
- Profile URL: https://github.com/rails
GitHub Events
Total
- Pull request event: 7
- Fork event: 3
- Watch event: 31
- Issue comment event: 3
- Push event: 3
Last Year
- Pull request event: 3
- Watch event: 15
- Issue comment event: 2
- Push event: 2
Committers metadata
Last synced: 3 days ago
Total Commits: 809
Total Committers: 76
Avg Commits per committer: 10.645
Development Distribution Score (DDS): 0.366
Commits in past year: 3
Committers in past year: 2
Avg Commits per committer in past year: 1.5
Development Distribution Score (DDS) in past year: 0.333
| Name | Commits | |
|---|---|---|
| Genadi Samokovarov | g****v@g****m | 513 |
| Hiroyuki Sano | s****1@g****m | 88 |
| Ryan Dao | d****g@g****m | 76 |
| mishina | t****8@g****m | 18 |
| Rafael Mendonça França | r****l@r****g | 7 |
| Jon Atack | j****n@a****m | 5 |
| Stan Angeloff | s****r@a****e | 4 |
| eileencodes | e****s@g****m | 4 |
| Guillermo Iguaran | g****n@g****m | 4 |
| Vít Ondruch | v****h@r****m | 3 |
| yaojie | l****3@g****m | 3 |
| patorash | c****o@g****m | 3 |
| Tsukuru Tanimichi | i****b@t****m | 3 |
| Timo Mämecke | t****o@m****m | 3 |
| Mikel Kew | m****l@b****m | 3 |
| Rafael Mendonça França | r****a@p****r | 3 |
| fatkodima | f****3@g****m | 2 |
| Charlie Somerville | c****e@c****m | 2 |
| Rodrigo Rosenfeld Rosas | r****s@g****m | 2 |
| Pat Allan | p****t@f****m | 2 |
| Isaac Betesh | i****h@o****m | 2 |
| Akira Koyasu | m****l@a****t | 2 |
| Akira Matsuda | r****e@d****p | 2 |
| Byron Bischoff | b****b@g****m | 2 |
| Herminio Torres | h****r@g****m | 2 |
| Aaron Patterson | t****e@r****g | 1 |
| Athos Ribeiro | a****r@f****g | 1 |
| Bruno Gonçales | b****o@g****m | 1 |
| Chashmeet Singh | c****h@g****m | 1 |
| David Backeus | d****d@g****m | 1 |
| and 46 more... | ||
Committer domains:
- pabloformoso.com: 1
- noah-patterson.com: 1
- trebex.net: 1
- matiaskorhonen.fi: 1
- luisromero.co: 1
- juanitofatas.com: 1
- dupuis.io: 1
- wyeworks.com: 1
- ubuntu.com: 1
- code.org: 1
- chibicode.com: 1
- shopify.com: 1
- moonclerk.com: 1
- mi6.com.ua: 1
- deheus.net: 1
- capsens.eu: 1
- lunarlogic.io: 1
- giantmonkey.de: 1
- brandfolder.com: 1
- cerner.com: 1
- josephjaber.com: 1
- qinix.com: 1
- riseup.net: 1
- fedoraproject.org: 1
- ruby-lang.org: 1
- dio.jp: 1
- akirakoyasu.net: 1
- on-site.com: 1
- freelancing-gods.com: 1
- charliesomerville.com: 1
- plataformatec.com.br: 1
- bikeroar.com: 1
- maemecke.com: 1
- ttanimichi.com: 1
- redhat.com: 1
- angeloff.name: 1
- atack.com: 1
- rubyonrails.org: 1
Issue and Pull Request metadata
Last synced: 3 days ago
Total issues: 67
Total pull requests: 58
Average time to close issues: over 1 year
Average time to close pull requests: about 1 month
Total issue authors: 62
Total pull request authors: 44
Average comments per issue: 4.22
Average comments per pull request: 1.6
Merged pull request: 41
Bot issues: 0
Bot pull requests: 0
Past year issues: 1
Past year pull requests: 3
Past year average time to close issues: 6 days
Past year average time to close pull requests: about 1 hour
Past year issue authors: 1
Past year pull request authors: 2
Past year average comments per issue: 2.0
Past year average comments per pull request: 1.0
Past year merged pull request: 1
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- Ben-Owen-3183 (4)
- sh19910711 (2)
- alex-benoit (2)
- jsonck (1)
- alienxp03 (1)
- voxik (1)
- augustosamame (1)
- codingiam (1)
- rosenfeld (1)
- chancancode (1)
- NehaPeer (1)
- Shelvak (1)
- alexey (1)
- amerov (1)
- aguynamedben (1)
Top Pull Request Authors
- gsamokovarov (4)
- mikelkew (3)
- causztic (3)
- p8 (3)
- 0xFarid (2)
- mishina2228 (2)
- stillhart (2)
- zunda (2)
- luiscobot (2)
- nageshlop (1)
- deivid-rodriguez (1)
- wagenet (1)
- JuanitoFatas (1)
- sh19910711 (1)
- kyotee (1)
Top Issue Labels
- bug (4)
- enhancement (2)
- usability (1)
- gsoc (1)
- docs (1)
Top Pull Request Labels
Package metadata
- Total packages: 15
-
Total downloads:
- rubygems: 321,806,270 total
- Total docker downloads: 196,152,870
- Total dependent packages: 55 (may contain duplicates)
- Total dependent repositories: 441,206 (may contain duplicates)
- Total versions: 138
- Total maintainers: 13
- Total advisories: 2
gem.coop: web-console
A debugging tool for your Ruby on Rails applications.
- Homepage: https://github.com/rails/web-console
- Documentation: http://www.rubydoc.info/gems/web-console/
- Licenses: MIT
- Latest release: 4.3.0 (published 8 days ago)
- Last Synced: 2026-03-02T09:02:54.821Z (1 day ago)
- Versions: 43
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 160,900,217 Total
- Docker Downloads: 98,076,435
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Downloads: 0.162%
- Average: 0.177%
- Docker downloads count: 0.546%
- Maintainers (13)
rubygems.org: web-console
A debugging tool for your Ruby on Rails applications.
- Homepage: https://github.com/rails/web-console
- Documentation: http://www.rubydoc.info/gems/web-console/
- Licenses: MIT
- Latest release: 4.3.0 (published 8 days ago)
- Last Synced: 2026-03-02T09:04:58.534Z (1 day ago)
- Versions: 43
- Dependent Packages: 55
- Dependent Repositories: 441,206
- Downloads: 160,900,217 Total
- Docker Downloads: 98,076,435
-
Rankings:
- Dependent repos count: 0.04%
- Downloads: 0.172%
- Dependent packages count: 0.503%
- Average: 0.873%
- Docker downloads count: 1.137%
- Stargazers count: 1.401%
- Forks count: 1.984%
- Maintainers (13)
- Advisories:
proxy.golang.org: github.com/rails/web-console
- Homepage:
- Documentation: https://pkg.go.dev/github.com/rails/web-console#section-documentation
- Licenses: mit
- Latest release: v4.3.0+incompatible (published 8 days ago)
- Last Synced: 2026-02-28T12:03:54.023Z (3 days ago)
- Versions: 40
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Stargazers count: 1.796%
- Forks count: 2.06%
- Average: 6.058%
- Dependent packages count: 9.576%
- Dependent repos count: 10.802%
gem.coop: web-console-compat
A debugging tool for your Ruby on Rails applications.
- Homepage: https://github.com/rails/web-console
- Documentation: http://www.rubydoc.info/gems/web-console-compat/
- Licenses: MIT
- Latest release: 3.5.1 (published over 8 years ago)
- Last Synced: 2026-02-28T12:03:53.445Z (3 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 2,918 Total
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 29.639%
- Downloads: 88.916%
- Maintainers (1)
rubygems.org: web-console-compat
A debugging tool for your Ruby on Rails applications.
- Homepage: https://github.com/rails/web-console
- Documentation: http://www.rubydoc.info/gems/web-console-compat/
- Licenses: MIT
- Latest release: 3.5.1 (published over 8 years ago)
- Last Synced: 2026-02-28T12:03:53.453Z (3 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 2,918 Total
-
Rankings:
- Stargazers count: 1.273%
- Forks count: 1.824%
- Dependent packages count: 15.706%
- Average: 31.569%
- Dependent repos count: 46.782%
- Downloads: 92.258%
- Maintainers (1)
debian-10: ruby-web-console
- Homepage: https://github.com/rails/web-console
- Documentation: https://packages.debian.org/buster/ruby-web-console
- Licenses:
- Latest release: 3.6.2-2 (published 20 days ago)
- Last Synced: 2026-02-13T04:26:58.009Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-11: ruby-web-console
- Homepage: https://github.com/rails/web-console
- Documentation: https://packages.debian.org/bullseye/ruby-web-console
- Licenses:
- Latest release: 4.0.1-2 (published 21 days ago)
- Last Synced: 2026-02-13T08:26:11.258Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-12: ruby-web-console
- Homepage: https://github.com/rails/web-console
- Documentation: https://packages.debian.org/bookworm/ruby-web-console
- Licenses:
- Latest release: 4.2.0-1 (published 19 days ago)
- Last Synced: 2026-02-12T23:44:08.392Z (19 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
debian-13: ruby-web-console
- Homepage: https://github.com/rails/web-console
- Documentation: https://packages.debian.org/trixie/ruby-web-console
- Licenses:
- Latest release: 4.2.1-1 (published 19 days ago)
- Last Synced: 2026-02-13T13:20:48.162Z (18 days ago)
- Versions: 1
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent repos count: 0.0%
- Dependent packages count: 0.0%
- Average: 100%
Dependencies
- actions/checkout v3 composite
- ruby/setup-ruby v1 composite
- crx ^3.0.2 development
- chai ^4.3.6 development
- mocha ^10.0.0 development
- mocha-headless-chrome ^4.0.0 development
- byebug >= 0 development
- mocha >= 0 development
- puma >= 0 development
- rake >= 0 development
- simplecov >= 0 development
- rack >= 0
- rails >= 0
- bindex >= 0.4.0
Score: 31.66451986617281