Closed emersonthis closed 5 years ago
Yes, this is expected. It is a way of bypassing changes to global objects. You can ensure that still works by including that following:
require 'ruby-measurement/core_ext'
Sorry it's not clear in the documentation, I'd happily accept a PR to address it!
I think I see what happened, I spaced out and copy/pasted the example from the README without noticing the require
s instead of gem
. Closing this and opening a new issue to ask about the right way to do this.
@mhuggins I just saw your last reply... I'm working on a Rails project. Is there a way to only require the sub-libraries using Bundler?
Bundler only allows you a single require in lieu of the gem name. So with that in mind, no. π
Got it. I donβt know much about Bundler (the mark of a good package manager) but it looks like the require:
option might do this. But I dunno...
On Jul 18, 2019, at 9:27 PM, Matt Huggins notifications@github.com wrote:
Bundler only allows you a single require in lieu of the gem name. So with that in mind, no. π
β You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.
Yeah, the require option will only allow one require though, not multiple.
^ with this in my Gemfile,
"dozen".to_unit
works as expected.When I follow the instructions on the README to load a subset of measurements,
.to_unit
is undefined. Ex:Is this expected?