tenex / rails-assets

The solution to assets management in Rails
https://rails-assets.org
MIT License
1.63k stars 69 forks source link

Problem with jQuery version in bower.json #158

Closed edwinv closed 10 years ago

edwinv commented 10 years ago

I'm trying to use the component bootstrap-daterangepicker from Rails Assets. The original bower.json states a requirement of jQuery:

"dependencies": {
    "jquery": ">=1.10",
    "momentjs": "~2.5.1"
}

I believe this means that any version higher than 1.10 of jQuery will be okay, so jQuery 2.x should work. When downloading the Gem from Rails Assets the gemspec states the dependencies as:

spec.add_dependency "rails-assets-jquery", "~> 1.10"
spec.add_dependency "rails-assets-momentjs", "~> 2.1"

This only allows for 1.10+ jQuery versions. When forking the project on Github and adding it as a new component to Rails Assets (moneybird--bootstrap-daterangepicker), the gemspec contains the right dependencies. When I use the gem in my Gemfile, the old ~> 1.10 keeps popping up.

Is there some caching issue here? It seems like bundler tries to look at a different kind of dependencies than actually stated in the gemspec.

sheerun commented 10 years ago

You probably use old datepicker version: https://github.com/dangrossman/bootstrap-daterangepicker/commit/0cb76a55e930b45b8051292c84dc7f57d1304010

edwinv commented 10 years ago

Thanks @sheerun, after explicitly stating the version number in my Gemfile, the correct version got loaded and my dependency issues are solved.

gem 'rails-assets-bootstrap-daterangepicker', '~> 1.3.7'