Paul Krill
Editor at Large

Rails web framework dumps jQuery

news
Dec 9, 20162 mins

The venerated library is being removed in favor of a new Ruby gem that uses vanilla JavaScript

jettison canopy handle eject
Credit: Marcin Wichary

Builders of Ruby on Rails, the Web development framework that has been around for more than 12 years, have removed the popular jQuery JavaScript library from the default Rails stack in favor of a Ruby gem using vanilla JavaScript.

Thus, jQuery is not a Rails dependency anymore. The gem, rails-ujs, was created by developer Dangyi Liu as part of the Google Summer of Code event.

Rails founder David Heinemeier Hansson said that jQuery simply is not as critical for Rails as it used to be. “JQuery was used to pave over differences in browsers that no longer exist to anywhere near the same degree any more,” he noted. “Rails-ujs just uses regular JavaScript for a built-in features in Rails we have that rely on JavaScript.”

Rails has a number of features, like data-confirm (which asks users to confirm an action before they complete it), that use JavaScript under the hood. A pull request has been filed in GitHub to remove jquery-rails from new applications and provide rails-ujs through Action View.

For years, jQuery has been a staple of the web, handling such tasks as HTML, document traversal and manipulation, and event handling. It’s used by 96.4 percent of websites whose library is known, according to W3techs, which surveys usage of web technologies.

Rails, meanwhile, has been seen as having lost some steam itself in favor of technologies such as Node.js. and Angular.js. The current release is Rails 5.0.0.1.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author