Comments (8)
@dblock i believe he meant @Koroeskohr 's gemfile, the same you suggested. I think we all agree, that @Koroeskohr 's problem is that he wants to use numbers_and_words, but by default that fetches AS 5.0 for him, which requires ruby 2.2, while he wants 2.1. the solution as both of you said is just pin AS in his gemfile.
edit: actually it has another layer. so @Koroeskohr is developing a gem. and such i guess he wants his gem to work on both ruby 2.1 and 2.2. that said i was under the impression bundler/gemspec is smart enough to understand that on 2.1 it can only install AS < 5.0.
@Koroeskohr can you provide us more information what is failing/how to reproduce?
from numbers_and_words.
the gem now requires ActiveSupport 5.0
I don't think so: https://github.com/kslazarev/numbers_and_words/blob/master/Gemfile#L4. It should use any version of activesupport
.
Do you mind posting a sample Gemfile
that reproduces the issue?
from numbers_and_words.
My gem just has those two dependencies in the .gemspec file :
spec.add_runtime_dependency "numbers_and_words"
spec.add_runtime_dependency "reform"
and is supposed to serve apps that use Ruby 2.1. When running the test suite for the gem out of a Rails app, it fetches ActiveSupport 5.0.0, which asks for Ruby 2.2.2. Probably an inevitable caveat, requiring a forced ActiveSupport version on my end, even though my application doesn't depend on it
from numbers_and_words.
If you want a lower version of AS than 5, you should tell your app in Gemfile with gem 'activesupport', '~> 4.0'
for example, otherwise it always tries to select the most recent one.
I'll close this, it works as designed I believe.
from numbers_and_words.
Probably an inevitable caveat, requiring a forced ActiveSupport version on my end
Exactly, you should add that restriction on your Gemfile
/ .gemspec
: http://guides.rubygems.org/patterns/#declaring-dependencies
from numbers_and_words.
@jlduran Are you saying we should add it in numbers_and_words
? I don't agree. This gem works well with ActiveSupport 5.0, your problem is that it brings a version of Ruby you don't want, no?
from numbers_and_words.
@dblock wrote:
Are you saying we should add it in numbers_and_words?
No, it was a suggestion for @Koroeskohr's .gemspec
file.
He can, either create a Gemfile
and restrict AS < 5, even a .ruby-version
file to build the gem (this would be a way of doing it without including the dependency in his .gemspec
file) or – the proper way – forcing the dependency on his .gemspec
file, after all, is his gem that is not compatible with AS 5, even if it does not use AS directly, it is needed by numbers_and_words
(imagine I try to include his gem on a Rails 5 project, for instance).
from numbers_and_words.
@jlduran @dblock well reading his description again he said 'a gem i work with requires numbers_and_words'. i'm not sure if that means developing an app/project that depends on a gem (that depends on numbers_and_words) or developing a gem (that depends on numbers_and_words). i just tested, and bundle install with a Gemfile that only has numbers_and_words in it on ruby 2.1 does give you an error (Gem::InstallError: activesupport requires Ruby version >= 2.2.2.
). so if he is developing an app/project that runs on 2.1 he should just pin AS < 5 himself in his own Gemfile, if he is developing a gem the users of his gem should pin AS < 5 in their own Gemfile.
from numbers_and_words.
Related Issues (20)
- Fork? HOT 12
- Finish German support
- Numeric Fallback HOT 5
- Drop EOL'ed Rubies in Travis CI HOT 1
- Configure I18n.available_locales
- Support for Arabic HOT 3
- Crashing Spanish Translations HOT 2
- Support for Chinese? HOT 1
- Support for float numbers in french HOT 1
- Floating-point numbers with five or more digits after decimal separator
- Move this gem into a github org?
- Ability to add units
- Why included .yml languages as internal instead of document them and let user customize? HOT 2
- Wrong precision 2 for spanish HOT 1
- I18n::InvalidPluralizationData (translation data {:one=>"tenth", :other=>"tenths"} HOT 7
- Incorrect joiner for some Dutch examples HOT 3
- Problem with hundreds as array HOT 1
- Does this gem work with Ruby 3.2.0 ? HOT 1
- When the numbers start with 0 it showing incorrect string value. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from numbers_and_words.