momentjs-rails wraps the Moment.js library in a rails engine for simple use with the asset pipeline provided by Rails 3.1 and higher. The gem includes the development (non-minified) source for ease of exploration. The asset pipeline will minify in production.
Add the following to your gemfile:
//= require moment
If you want to include a localization file, also add the following directive:
//= require moment/<locale>.js
momentjs-rails 2.20.1 == Moment.js 2.20.1
Every attempt is made to mirror the currently shipping Moment.js version number wherever possible. The major, minor, and patch version numbers will always represent the Moment.js version. Should a gem bug be discovered, a 4th version identifier will be added and incremented.