-
Notifications
You must be signed in to change notification settings - Fork 51
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
Review bundle groups in Gemfile #4291
Comments
We can take a look at this, although we use This presents an interesting issue -- an installation is either using capistrano or using containers, but almost certainly not both. Any idea on how to structure a Gemfile to handle that? |
If you put gems related to deployment into a group (like the existing groups in the Gemfile), I can tell Bundler to exclude that group during installation, while building the container image. |
I just found out that not installing gems in certain groups causes the application to fail during startup, because fromthepage/config/application.rb Line 7 in 1432ebd
explicitly loads all gems. Is it possible to be more cautious in loading gems? I'm thinking it could make FromThePage run with a smaller memory footprint too. I don't want to use OpenAI or Bento, so I don't want to install, let alone load those gems. Edit: I created #4316 to address this specific line of code. |
@WillNigel23, what do you think? |
Sounds good, but I think we do indeed need to review it. I have been slowly grouping relevant gems together (I think in rails upgrade PR I did some gem cleanup there) but still needs a lot more |
While "we" are reviewing: I believe the I did notice that #4237 reordered gems in the Gemfile, although I don't know what most of them do and cannot say which gems would better go in which group. As long as all gems are required on startup, grouping doesn't really matter. By the way, I realised that me not wanting to use and install OpenAI and Bento is a different issue, because they are used in the application itself, not for development, testing, building or deploying the application. |
In an effort to create a small-ish Docker/Podman image for running FromThePage in production, I would like to not install gems that are not necessary for running the application. I think
capistrano
may not be needed, for example.Would it be possible to review the current
:test
,:development
and:assets
groups of gems and perhaps add one for deployment? When building the image, it is then clearer which groups can be left out.Maybe the
sassc-rails
gem can be moved to the:assets
group?The text was updated successfully, but these errors were encountered: