Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Event 'rys-gemfile' not defined in Bundler::Plugin::Events #6766

Closed
ondra-m opened this issue Oct 29, 2018 · 6 comments
Closed

Event 'rys-gemfile' not defined in Bundler::Plugin::Events #6766

ondra-m opened this issue Oct 29, 2018 · 6 comments

Comments

@ondra-m
Copy link

ondra-m commented Oct 29, 2018

Hello,

I have a plugin for bundler which register a hook. The hook is then called in a Gemfile.

bundle install fail because the event is not yet register. It works in version < 1.17.

# Gemfile

# register plugin
plugin 'rys-bundler', github: 'easysoftware/rys-bundler', branch: 'master'

# <-- This fail because bundler needs a defined event 
# <-- However the event is registered in the plugin above
Plugin.hook('rys-gemfile', self) 

Is there any chance that it will works again? I would like to avoid using rescue.

Thanks

@segiddins
Copy link
Member

Can you please share the full error that you’re seeing? Thanks!

@ondra-m
Copy link
Author

ondra-m commented Oct 29, 2018

[!] There was an error parsing `Gemfile`:
[!] There was an error parsing `Gemfile`: Event 'rys-gemfile' not defined in Bundler::Plugin::Events. Bundler cannot continue.

# from Gemfile
# -------------------------------------------
# plugin 'rys-bundler', github: 'easysoftware/rys-bundler', branch: 'master'
> Plugin.hook('rys-gemfile', self)
# -------------------------------------------

@colby-swandale
Copy link
Member

This is happening because of #6548 where we restrict the events to only be defined by Bundler. You will need to change your plugin to use either the before-install, after-install, before-install-all or after-install-all events

@ondra-m
Copy link
Author

ondra-m commented Nov 19, 2018

Will it change in the future or hooks are designed only for Bundler's internal things?

@colby-swandale
Copy link
Member

Hooks will only be defined by Bundler going forward.

@ondra-m
Copy link
Author

ondra-m commented Nov 19, 2018

rescue will solve it

@ondra-m ondra-m closed this as completed Nov 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants