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

gem installs an outdated version #170

Open
kamazee opened this issue Oct 5, 2018 · 20 comments
Open

gem installs an outdated version #170

kamazee opened this issue Oct 5, 2018 · 20 comments
Labels

Comments

@kamazee
Copy link
Contributor

kamazee commented Oct 5, 2018

Gem with spec version 1.1.1.160 actually contains version 1.0.2 of the plugin.
Here's how to see the difference:

gem fetch vagrant-hostsupdater
gem unpack vagrant-hostsupdater-1.1.1.160.gem
curl -L -O https://github.com/cogitatio/vagrant-hostsupdater/releases/download/1.1.1/vagrant-hostsupdater.gem
gem unpack vagrant-hostsupdater.gem

The snippet above produces 2 directories:

.
├── vagrant-hostsupdater # From github
└── vagrant-hostsupdater-1.1.1.160 # gem fetch 

diff.txt is a difference between the two (diff -r vagrant-hostsupdater vagrant-hostsupdater-1.1.1.160; left side is github version, right side is from rubygems).

I expected that 1.1.1 from rubygems would match 1.1.1 from github. Could you update the gem on ruygems?

@kamazee
Copy link
Contributor Author

kamazee commented Oct 8, 2018

ping @Cogitatio @cgsmith 🙄
Could you slap rubygems.org to make it distribute a correct version?

@cgsmith
Copy link
Collaborator

cgsmith commented Oct 8, 2018

1.1.1.160 is the correct version

@kamazee
Copy link
Contributor Author

kamazee commented Oct 8, 2018

@cgsmith it is; the thing is that what rubygems.org distributes as 1.1.1.160 appears to be 1.0.2.
Please check the diff above between 1.1.1 from github and 1.1.1.160 from rubygems. Is that expected?

@cgsmith
Copy link
Collaborator

cgsmith commented Oct 8, 2018

That is strange.... It shows 1.1.1.160 on the rubygems interface

@kamazee
Copy link
Contributor Author

kamazee commented Oct 8, 2018

Indeed: looks like something went wrong when building the gem that was pushed to rubygems.org. Version in gemspec is correct but actual content is outdated. Gem in releases on github is correct, though, and it would be cool if someone with permissions replaced one that is on rubygems.org with one from github.

@kamazee
Copy link
Contributor Author

kamazee commented Oct 10, 2018

@cgsmith sorry to disturb you again but could you push gem that is published on releases page of github to rubygems.org so they are the same? It's a pity that vagrant (that uses rubygems.org) installs an outdated version: we wanted to use new structure of aliases in our team but we failed because even though rubygems thinks in distributes 1.1.1.160 but actually installs 1.0.2, and things like the following just fail:

config.hostsupdater.aliases = {
    '10.0.0.1' => ['foo.com', 'bar.com'],
    '10.0.0.2' => ['baz.com', 'bat.com']
}

Well, we can always install plugin manually but hey, it would be nicer to make the latest code easily accessible to everyone :)

@benbor
Copy link

benbor commented Oct 18, 2018

Hi guys. The problem reproduces on my env:

> gem --version
2.7.6
> ruby --version
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]

@kamazee
Copy link
Contributor Author

kamazee commented Nov 2, 2018

@Cogitatio @cgsmith could you please re-publish the latest release to rubygems (or cut a new one) to make it distribute the correct version of the plugin? I'd be really grateful; just using vagrant plugin is way more convenient than installing it manually and instructing people around to do so :)

Thanks for maintaining this great plugin!

@kamazee
Copy link
Contributor Author

kamazee commented Nov 15, 2018

@cgsmith I've just stumbled upon #160 (comment) which revealed that 1.1.1.160 was an intentional retag of 1.0.2 to get rid of 1.1.1 that hadn't worked on Windows. I thought it was just a mistake. Sorry for the noise, then. I guess the only option to have 1.1.1 back is to fix Windows 10 issue; I'll see if I can do something with it.

Could you please confirm or deny that if Windows 10 issue is fixed, 1.1.1 will appear on rubygems.org (e.g. as 1.1.2)?

@Enchiridion
Copy link

@kamazee This probably explains why I can't get the example for setting up multiple adapters with separate IPs working:

config.hostsupdater.aliases = {
    '10.0.0.1' => ['foo.com', 'bar.com'],
    '10.0.0.2' => ['baz.com', 'bat.com']
}

I keep getting this error /.vagrant.d/gems/2.4.4/gems/vagrant-hostsupdater-1.1.1.160/lib/vagrant-hostsupdater/HostsUpdater.rb:22:in 'concat': no implicit conversion of Hash into Array (TypeError). I think I saw somewhere this support was added in 1.1.1.

@kamazee
Copy link
Contributor Author

kamazee commented Jan 3, 2019

@Enchiridion yes, right. I created this issue after debugging the very same symptom you're experiencing.
At the end of the day, I built a custom version (based on 1.1.1 with changes from #173 ), published it in a corporate gems repository and pointed vagrant to the custom private repository I pushed the plugin into.

I hope to get rid of the custom version one day, though.

@cgsmith
Copy link
Collaborator

cgsmith commented Jan 3, 2019

I have repo access to write to the repo but would like to open this plugin up to be able to be managed by more in the community. Unfortunately @Cogitatio is not responding to those requests.

I am thinking of creating a plugin and deprecating this plugin's URL and would like your feed back on this.

I don't want anyone to have custom versions and as many issues as have been popping up - that was the whole point why I wanted maintainer access to the repo.

@kamazee
Copy link
Contributor Author

kamazee commented Jan 4, 2019

I am thinking of creating a plugin and deprecating this plugin's URL and would like your feed back on this

Do you basically mean forking it? Well, if @Cogitatio doesn't respond to any requests related to this plugin, this might be the only option.

However, I don't think I follow the rest of the idea: what do you mean by "open this plugin up to be able to be managed by more in the community"?

As I see it, the project need people who are ready to review/merge pull requests and someone (or something) to publish releases on RubyGems (as I understand it's done manually at the moment but it's probably fairly easy to automate so likely having the former would be sufficient).

@cgsmith
Copy link
Collaborator

cgsmith commented Jan 4, 2019

Automating would be great. @Cogitatio is the only one who can add people for reviewing/merging pull requests right now.

I'll fork it and start a transition to use a different path. I want to give enough notice to other users and companies that use vagrant-hostsupdater

@kamazee
Copy link
Contributor Author

kamazee commented Aug 14, 2019

@cgsmith actually, forking should go smoothly as the gem should be installed from rubygems, and it doesn't seem to care where a gem being pushed originates from; you listed as an owner there, so you have permissions to push. Basically, you can just fork this, change url on rubygems so people go the new place when they want to discover the source and that's it.
Are you still interested? If so, I can offer a hand if needed.

@alnorth
Copy link

alnorth commented Feb 5, 2020

What's the current status on this? I've been trying to use the new aliases functionality from 1.1.0 and get the error message no implicit conversion of Hash into Array. I'm using 1.1.1.160.

If it's not supported by the version that's installed by vagrant plugin install vagrant-hostsupdater then maybe you should remove it from the readme as it's very confusing.

@kamazee
Copy link
Contributor Author

kamazee commented Feb 16, 2020

@alnorth , 1.1.1.160 is actuallly a 1.0.2, not 1.1.x. You can find reasons above in the thread; a maintainer (either current or a new one who's willing to fork it and maintain the fork) has to step in to resolve the issue.

@alnorth
Copy link

alnorth commented Feb 17, 2020

@kamazee Can this be highlighted in the readme without a maintainer stepping in? It's very frustrating to read about something in the docs and then not be able to use it on the version that's installed using the recommended installation method.

@kamazee
Copy link
Contributor Author

kamazee commented Feb 17, 2020

I don't think so: even if one submits a pull request that removes the feature from the description or submits a fix that makes releasing of 1.1.x possible again, maintainer has to merge them. Yeah, it took me some debugging to understand what was going on but there's barely anything I can do.

@jstnbr
Copy link

jstnbr commented Mar 19, 2020

The alias array feature does not work for me either. It would be a very useful feature — especially considering that it's already in the documentation. Is this still priority and is there anything that can be done? Thanks!

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

No branches or pull requests

6 participants