Giter Club home page Giter Club logo

rails-web-console's Introduction

RailsWebConsole

A Rails mountable engine for running Ruby scripts on the browser in the context of a controller action.

Dependencies

It doesn't assume anything about Sprockets being available and will embed any JS directly into the views to avoid any dependencies on Sprockets.

ActionView is required though but it's not declared as a dependency in the gemspec as it's a separate gem just as of Rails 4.1.x, so it would prevent this gem from working with older Rails versions, but you should make sure your Rails application include support to ActionView.

Browser support

All modern browsers and IE >= 8 should be supported.

Minimal Ruby supported version

1.9 is the minimal required version due to usage of require_relative and the new hash syntax.

Patches for supporting older Ruby versions won't be accepted.

Install

In your Gemfile, put the dependency like this:

gem 'rails-web-console', group: :development

This will automatically mount it in /console. If you want to specify a different mount point, use:

gem 'rails-web-console', require: 'rails_web_console/engine', group: :development

And add this to your config/routes.rb:

mount RailsWebConsole::Engine => '/inspect' if Rails.env.development?

If you intend to use this in production environment (strongly discouraged), be sure to protect console routes. Do it on your own risk!

Usage

Just access "/console" (or whatever path you've chosen) in your browser.

Support for older versions of Rails

I won't be supporting older versions of Rails to keep the source as simple as possible.

Take a look at older releases of this gem for supporting older Rails.

Copyright (c) 2014 [Rodrigo Rosenfeld Rosas], released under the MIT license

Bitdeli Badge

rails-web-console's People

Contributors

bitdeli-chef avatar cpuguy83 avatar hakunin avatar jihao avatar rosenfeld avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.