Plugin for running Ruby in the browser seamlessly from Rails, and display either HTML or vector graphics
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Browser, meet Ruby on Rails

= What is it?

Silverline is a Ruby on Rails plugin which gives the ability to run Ruby in 
the browser to manipulate HTML or vector graphics. Having Ruby code run in 
the browser elevates client programming in Rails to be first-class, and 
integrated with the rest of the framework.

= Gimme!

  > cd /path/to/rails/app/vendor/plugins/
  > git clone git://

This repository holds the Rails plugin only. To get a demo application using
Silverline, visit

You'll also need: Silverlight 2 for Windows or Mac
Note: You can find the developer version of the Silverlight runtime in

More information on Lighthouse:

= What can it do?

Silverline can run Ruby on the client because of Silverlight, the 4 megabyte 
download of the .NET Framework, and IronRuby, the implementation of Ruby on 
.NET and the Dynamic Language Runtime. Silverline lets you do anything you 
can do in Silverlight with IronRuby you can do from Rails, but a whole lot 

Silverlight applications can use HTML and vector graphics with WPF (either 
through code or XAML markup for rendering their UI; silverline integrates 
this capability into Rails by enabling Ruby and XAML partials.

== Easier from Rails

Ruby partials can even use RJS, so simply renaming foo.rjs to foo.rb will 
avoid the server-side JavaScript generation and actually runfoo.rb on the client. 
XAML partials give you the ability to render XAML without having to bootstrap 
Silverlight yourself. XAML partials can also be passed through ERb for 
server-side or client-side processing.

== Experimental

Note: the following is still a work-in-progress; your feedback is appreciated:

Silverline also lets you run pieces of your Rails application on the client, 
removing the need to write a separate JavaScript or Flash application simply 
to move functionality to the client. This is accomplished by flagging certain 
actions as "client", and running the necessary pieces of your Rails appliation 
and Rails itself on IronRuby in the browser.

You can also decorate ActiveRecord models with "acts_as_client" so any calls 
to ActiveRecord on the client get translated into ActiveResource calls to a 
restful API on the ActiveRecord model that was decorated.

= Let's get to work!

Feel like Silverline is missing something? Feel free to clone the repository 
and add anything you want. And if you want to let us know about your awesome 
change, just send us a pull-request on!