Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case sensitivity messing up dependencies in bundler #384

Open
pencilcheck opened this issue Oct 25, 2016 · 7 comments
Open

Case sensitivity messing up dependencies in bundler #384

pencilcheck opened this issue Oct 25, 2016 · 7 comments

Comments

@pencilcheck
Copy link

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.

@hut8
Copy link
Member

hut8 commented Oct 25, 2016

Investigating

@hut8
Copy link
Member

hut8 commented Oct 25, 2016

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?

@pencilcheck
Copy link
Author

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 notifications@github.com 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
#384 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHHNJYj40PJnWhhLsQBBkh63OtbkzSnks5q3XtCgaJpZM4Kfg2z
.

@vlymar
Copy link

vlymar commented Nov 8, 2017

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

@vlymar
Copy link

vlymar commented Nov 8, 2017

Note that on rails-assets.org, the gem is lowercase: https://rails-assets.org/#/components/dompurify

@vlymar
Copy link

vlymar commented Nov 8, 2017

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.

@vlymar
Copy link

vlymar commented Nov 8, 2017

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.
screen shot 2017-11-07 at 7 36 32 pm

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants