rails-assets
rails-assets copied to clipboard
Case sensitivity messing up dependencies in bundler
rails-assets-angular-scroll-pane depends on "jscrollpane" but jscrollpane pointing to "jScrollPane" at https://github.com/vitch/jScrollPane
And even though in bundle it would say "Installing rails-assets-jscrollpane 2.0.23", and installed, when running "rails s" it will say that "Could not find rails-assets-jscrollpane-2.0.23 in any of the sources"
And it turns out that in the gem folder where bundle stores the gem, the folder is actually named
"rails-assets-jScrollPane-2.0.23"
No matter what I do the case will always be wrong.
I hope for a fix. Thanks.
Investigating
I tried both gem 'rails-assets-jScrollPane'
and gem 'rails-assets-jscrollpane'
and both exist. Can you try manually adding gem 'rails-assets-jscrollpane'
to your Gemfile? What OS are you on?
I am on Mac and I did try adding the gem with lower case but it didn't work On Mon, Oct 24, 2016 at 8:45 PM Liam [email protected] wrote:
I tried both gem 'rails-assets-jScrollPane' and gem 'rails-assets-jscrollpane' and both exist. Can you try manually adding gem 'rails-assets-jscrollpane' to your Gemfile? What OS are you on?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tenex/rails-assets/issues/384#issuecomment-255928586, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHHNJYj40PJnWhhLsQBBkh63OtbkzSnks5q3XtCgaJpZM4Kfg2z .
I had the same problem.
Gemfile:
source 'https://rails-assets.org' do
gem 'rails-assets-formrenderer-base', '1.2.6'
end
the gemspec for rails-assets-formrenderer-base
has the following:
spec.add_dependency "rails-assets-DOMPurify", "~> 1.0.2"
The Gemfile.lock
shows the same capitalization. Bundler seems unable to find this gem, because every time I run bundle
it shows
Fetching rails-assets-DOMPurify 1.0.2
Installing rails-assets-DOMPurify 1.0.2
(instead of "Using rails-assets-DOMPurify 1.0.2").
Additionally, when I try to launch the server, it shows:
Could not find rails-assets-DOMPurify-1.0.2 in any of the sources
Run `bundle install` to install missing gems.
Adding gem 'rails-assets-dompurify'
to my Gemfile
doesn't help.
What does work is manually editing Gemfile.lock
and lower casing all occurrences of rails-assets-DOMPurify
. At this point bundle
shows that its "Using" the gem, and I'm able to start a server.
Anyone have any idea whats going on here?
I'm on macOS, using bundler version 1.15.4
Note that on rails-assets.org, the gem is lowercase: https://rails-assets.org/#/components/dompurify
Nvm, when I tried to deploy I got the following error:
Downloading rails-assets-formrenderer-base-1.2.6 revealed dependencies not in
the API or the lockfile (rails-assets-DOMPurify (~> 1.0.2)).
This tends to happen when Gemfile.lock is manually edited, so I'll need to find some other workaround.
I found another workaround - since I control the formrenderer-base
library, I was able to just downcase the dependency name in bower.json
from:
"DOMPurify": "~1.0.2"
to
"dompurify": "~1.0.2"
I think the root of the problem here is that there are two bower components for this library, one lower case and one with mixed case.
I released a new version of my library, and it looks like now bundler/rails-assets was able to match against the existing lowercase dompurify rubygem.
It looks like right after I did this, someone added a second dompurify package to rails-assets, this one upper case: https://rails-assets.org/#/components/DOMPurify . So now it should work either way.