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
Init fails for gems with optional dependencies #925
Comments
|
Until this is fixed, it's probably worth mentioning @jakehow's workaround for anyone else who encounters the issue: just install the gems that it complains about and run init again. once the init process has been completed, it seems that the gems can be uninstalled without breaking anything. |
|
You can ignore files during |
|
@ptarjan the file is in active-admin gem so they won't be able to |
|
@ptarjan yes, this is for files that are not in the project, but in dependencies of the project |
|
I added the sigil to https://github.com/activeadmin/activeadmin/blob/master/lib/active_admin/cancan_adapter.rb, but it’s still triggered: Using the workaround of (temporarily) installing the gems works indeed. |
|
Same issue with https://github.com/jch/html-pipeline |
|
Same issue with https://github.com/kjvarga/sitemap_generator |
|
😬 This is now a problem for everyone on Ruby 3.0 because of sorted_set: https://github.com/ruby/ruby/blob/be9b5553a3ae3a90c73d4c11786cb1a813e915f6/lib/set/sorted_set.rb |
|
Going to close this in favor of Tapioca |
Input
Many gems include optional functionality using the following pattern:
Examples:
https://github.com/activemerchant/active_merchant/blob/master/lib/active_merchant/billing/gateways/braintree_blue.rb#L3
Alternate method of same strategy in ActiveAdmin:
https://github.com/activeadmin/activeadmin/blob/master/lib/active_admin/dependency.rb#L78
When running
srb initin a project, because every file is required, the init fails due to the errors raised by code like this (even though the project may not require this functionality).Observed output
For the Braintree example the following error is raised and not rescued by the init process.
Expected behavior
There should be some way to ignore specific files during init if this class of error is not easily handled by the init strategy, and when errors are raised during init, a pointer to the documentation for this scenario would be helpful.
The text was updated successfully, but these errors were encountered: