gazay/gon

Your Rails variables in your JS

View on GitHub ↗Jump to charts ↓Open shareable report →

gazay/gon has 3k+ stars and 150+ forks on GitHub, is written in Ruby, and was last pushed on Oct 18, 2026. Data as of . Signed-in members get hourly updates — create a free account.

Summary Information

Updated 1 hour ago
Added to GitGenius on September 22nd, 2026
Created on May 9th, 2011
Open Issues & Pull Requests: 40 (+0)
GitHub issues: Enabled
Number of forks: 184
Total Stargazers: 3,105 (+0)
Total Subscribers: 48 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 124.8 days
Mean response time: 596.1 days
90th percentile: 2474.3 days
Tracked items: 14

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 1
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 253 days
Stale 30+ days: 1
Stale 90+ days: 1

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

Sign in to see which issues are moving.
Sign in

Detailed Description

Gon is a Ruby gem that passes Rails controller variables to JavaScript without manual serialization or view-layer parsing.

The problem it solves is the friction of moving data from Rails controllers to client-side JavaScript. Typically this requires writing data to view attributes or embedding JavaScript in templates, then parsing those values in separate JavaScript files. Gon streamlines this by letting you assign variables in your controller and access them directly in JavaScript through a global gon object. The tool includes a gon.watch feature that enables updating these variables via AJAX without page reloads, useful for displaying live data. It integrates with Jbuilder and Rabl for template-based data serialization.

You should choose this tool if you have a Rails application where controllers need to pass initialization data to JavaScript files. It works well for traditional server-rendered Rails apps that need to bootstrap client-side state. The README mentions ports exist for Sinatra, .Net MVC, and Elixir Phoenix, indicating the pattern has proven useful across frameworks, though the core gem targets Rails specifically. It also offers an AMD-compatible version for projects using AMD module loaders.

The project maintains a stable, minimal codebase focused on solving a single problem. Development activity is sparse but consistent, with occasional updates addressing compatibility and edge cases rather than feature expansion. The tool has remained largely unchanged in its core approach, suggesting the maintainers view the problem as solved and prioritize stability over adding complexity.