Comments (7)
Yeah, activating Gel (the eval
) puts Gel's binstubs on your path.
If you don't want to use Gel by default, you may not want that in your shell config.
It could be interesting to make explicit bundle exec
switch to Bundler even when Gel's been activated, but I'm not sure how feasible it would be, so for now I'll go with "PRs welcome" on that one 😅
from gel.
bundle exec rake style
To clarify, have you aliased bundle
to gel
(not recommended), or are you literally running Bundler here? Do you intend to be?
from gel.
I did alias bundle
to gel
So the above error is when running bundler
in zshell. I removed a bundler zsh plugin. The bundler above is "pure" bundler (now 1.17.2 if that matters).
$ which bundler
/Users/viktor/.rvm/gems/ruby-2.6.3/bin/bundler
$ bundler --version
Traceback (most recent call last):
3: from /Users/viktor/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
2: from /Users/viktor/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
1: from /Users/viktor/.rvm/gems/ruby-2.6.3/bin/bundler:23:in `<main>'
/usr/local/Cellar/gel/0.2.0/lib/gel/compatibility/rubygems.rb:150:in `activate_bin_path': Unknown gem "bundler" (RuntimeError)
$ gem install bundler --version 1.17.2
Successfully installed bundler-1.17.2
1 gem installed
$ which bundler
/Users/viktor/.rvm/gems/ruby-2.6.3/bin/bundler
$ bundler --version
Traceback (most recent call last):
3: from /Users/viktor/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>'
2: from /Users/viktor/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval'
1: from /Users/viktor/.rvm/gems/ruby-2.6.3/bin/bundler:23:in `<main>'
/usr/local/Cellar/gel/0.2.0/lib/gel/compatibility/rubygems.rb:150:in `activate_bin_path': Unknown gem "bundler" (RuntimeError)
# comment-out `eval "$(gel shell-setup)"` in `.zshrc`
$ which bundler
/Users/viktor/.rvm/gems/ruby-2.6.3/bin/bundler
$ bundler --version
Bundler version 1.17.2
$ gem install bundler --version 1.17.2
Successfully installed bundler-1.17.2
1 gem installed
from gel.
Okay, it looks like we're touching on a few separate issues here...
The last one is the easiest to fix -- there's a special case for bundle
, but not bundler
:
gel/lib/gel/compatibility/rubygems.rb
Lines 130 to 132 in 9414182
(Maybe it should only check the gem_name
, and treat any executable belonging to Bundler as being special-cased?)
Next up is the fact you're using bundle exec
to run a Gel-generated binstub: that will work, but it won't use Bundler. Because Bundler's the default, we assume any explicit use of Gel should take priority, whether that's via gel exec
, or the use of a Gel binstub. (If you didn't intend to use Bundler, note that as long as you have Gel binstubs in place, just plain rake style
will do what you want -- no need for any exec
at all.)
Finally, the exception you're seeing: our Gem::Dependency#requirement
is returning an array, when it apparently should be a Gem::Requirement
. That probably needs to be fixed here:
gel/lib/gel/compatibility/rubygems.rb
Line 57 in 9414182
from gel.
Next up is the fact you're using bundle exec to run a Gel-generated binstub
Hmmm, maybe I'm unintentionally using Gel-generated binstub. I know I have created binstubs in my rails app before I installed Gel. I then installed and setup Gel as per README:
brew install gel; echo 'eval "$(gel shell-setup)"' >> .zshrc # more-less
...restarted shell session and ran bundle exec rake <whatevs>
.
Not sure if this helps:
$ cat bin/bundle
#!/usr/bin/env ruby
# frozen_string_literal: true
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
load Gem.bin_path('bundler', 'bundle')
from gel.
I haven't looked at Gel's source code, so I'm speaking from a "blackbox user" perspective. :)
I'd think that the tool would work either:
- by being an alias to
bundle
/bundler
, kind of whathub
is togit
. - or, it would be a tool you'd explicitly use instead of
bundler
, kind of whatyarn
is tonpm
In the case 1), I'd expect to be able to do alias bundle=gel
.
In the case 2), I'd expect that, if I never explicitly call gel <smth>
, it would not use the tool.
I assume that's exactly how the tool works if I remove the Gel's shell setup?
Maybe this should be noted in the README?
I'm gonna give it a shot using it explicitly.
Thanks!
from gel.
I'm not sure how much more strongly we can emphasise that Gel will do things if you tell it to.. the README already says "Then, either activate Gel in your current shell: [..] Or add it to your .bashrc or .zshrc to enable it everywhere: [..]"
In the case 2), I'd expect that, if I never explicitly call
gel <smth>
, it would not use the tool.
This breaks down because we're providing a replacement for RubyGems too, and consequently we have to supply binstubs. If you run rake
(which is notably not e.g. gem exec rake
), it has to be loaded by either RubyGems or Gel -- likewise if you do require "nokogiri"
inside a plain Ruby script. The shell setup is what makes those happen.
from gel.
Related Issues (20)
- gel lock puts lock file in strange places HOT 6
- bundle exec fails if gem in git repo installed via gel HOT 2
- gel install fails with gem yet to be pushed to Rubygems HOT 7
- Issue installing sassc HOT 7
- Discoverability HOT 1
- gel ignores gemspec definition
- Non-default gem sources fight with bundler over "!" HOT 3
- `gel shell-setup` (or any gel command) fails with undefined method 'use_gemdeps' for Gem:Module HOT 3
- Fails to install gems with compiled extensions HOT 1
- gel can't handle plugins defined in the Gemfile HOT 3
- Can't install gems with Mastodon HOT 2
- Gel Internal Error with rubocop-ast and sassc
- Requiring version in gemspec from git source fails HOT 2
- Thread deadlock HOT 2
- Gel calling private method of PubGrub
- ruby_home doesn't work with gel 0.3.0 HOT 2
- Gem already installed on first run should not fail with a non-zero error HOT 4
- Error installing `aws-sdk-resources` HOT 7
- `gell install` fails with rdkafka HOT 3
- common dependencies across component engines 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 gel.