I am making changes to my ruby gem to make it asset pipeline compatible. In my gemspec I want to say that it requires rails version > 3.1 and < 4. How do I do that.
currently this is what I have.
s.add_dependency("rails", ">= 3.1")
But this is not ideal. This is saying that it will also work with rails 4.0 which might not be true.
You can use the pessimistic operator
~>Using the pessimistic operator, you could write
s.add_dependency("rails", "~> 3.1")which is equivalent to
'>= 3.1', '< 4.0'