Comments (4)
AFAICT It should already be including only the "default"
group:
Though I'm unsure about whether that is working like I expect it or not:
Lines 165 to 175 in 4cf7917
[nix-shell:~/.../rails-nix]$ find $(nix-build -A app.gems) -iname '*capybara*'
/nix/store/0hnxrd1i0vkha5ccnbhxxnkqqcclvfph-rails-nix-gems/lib/ruby/gems/2.7.0/specifications/capybara-3.36.0.gemspec
/nix/store/0hnxrd1i0vkha5ccnbhxxnkqqcclvfph-rails-nix-gems/lib/ruby/gems/2.7.0/gems/capybara-3.36.0
from rails-nix.
Given that forcing groups = ["default"]
to the bundlerEnv
call removes capybara
from the gems output, I figure it's not working as I understand it.
from rails-nix.
This is because the default groups
isn't used here:
- https://github.com/NixOS/nixpkgs/blob/5c4d9d0e50e7a9158a8ca976dea58d3ec95f9c56/pkgs/development/ruby-modules/bundler-env/default.nix#L41-L42
- https://github.com/NixOS/nixpkgs/blob/5c4d9d0e50e7a9158a8ca976dea58d3ec95f9c56/pkgs/development/ruby-modules/bundled-common/default.nix#L21
from rails-nix.
No PRs opened, as this might not be fixable on our end, and might require work on the Nixpkgs end to fix problems.
See how there's a reverted commit to "fix" the image build, it's not sufficient as when running the same underlying issue surfaces. (And anyway felt like a bad fix.)
The issue, AFAIUI is that if we only install some gem groups, bundle
for bundle exec
is not aware of it, and will get annoyed.
Could not find debug-1.4.0, web-console-4.2.0, capybara-3.36.0, selenium-webdriver-4.1.0, webdrivers-5.0.0 in any of the sources
Run `bundle install` to install missing gems.
This might be fixed if the store path holding the Gemfile{,.lock}
files had a .bundle/config
with the config equivalent to running bundle config set --local without test development
. Though this doesn't "scale" as a solution, we can't know what groups to add to BUNDLE_WITHOUT
.
Note that we could handle it locally, but it would require somehow wrapping anything running in that environment to be wrapped with the BUNDLE_WITHOUT
environment variable, which would need to list the remainder of allGroups - [ "default" ]
. The latter part is doable with gemset.nix
, but wrapping all with BUNDLE_WITHOUT
is not a reliable solution.
The only reliable solution would be to get bundler to see its .bundle/config
for the given gemset, which requires some work within Nixpkgs.
from rails-nix.
Related Issues (20)
- Increase the layer count HOT 2
- Setup a machine VM for running Nix builds HOT 1
- Javascript dependencies HOT 2
- Custom Ruby / Bundler versions HOT 5
- Extract nix code to be reusable HOT 1
- Gems are rebuilt on gemdir input change HOT 3
- Extend Rails documentation to include Sidekiq and multiprocess apps HOT 1
- Write a basic documentation page for launching Rails apps
- Ensure nix-shell is usable and useful HOT 2
- Make assets pre-compilation a discrete cacheable build and layer HOT 3
- grpc gem build failure HOT 8
- nixpkgs 21.11 is missing an important coreutils patch HOT 2
- Choosing a strategy for changing nixpkgs versions HOT 4
- Add examples for all configurable options in rails-nix/default.nix HOT 1
- Work out how to reduce the image size HOT 2
- Try strategies to reduce closure sizes in an ad-hoc manner HOT 1
- Update the `pg` gem in Nixpkgs to depend on `postgresql.lib` to reduce the closure size HOT 2
- Look at strategies to separate runtime vs. app in containerization layers
- Customize the layering strategy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails-nix.