My problem was that I did:
sudo gem install bundler
So I had installed as root rather than as myself. So I uninstalled as root, then installed as myself:
sudo gem uninstall bundler
gem install bundler
rbenv rehash
(last command for if you are using rbenv)
And it worked. The "correct" path was in .bashrc (or other shell profile), at least according to
$PATH
=> zsh: /Users/myself/.rbenv/shims:/Users/myself/.rbenv/bin: ... etc
but it was expecting it to be installed for myself - not for root. In my case, its rightful installation place is in ~/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler
My problem was that I did:
sudo gem install bundler
So I had installed as root rather than as myself. So I uninstalled as root, then installed as myself:
sudo gem uninstall bundler
gem install bundler
rbenv rehash
(last command for if you are using rbenv)
And it worked. The "correct" path was in .bashrc (or other shell profile), at least according to
$PATH
=> zsh: /Users/myself/.rbenv/shims:/Users/myself/.rbenv/bin: ... etc
but it was expecting it to be installed for myself - not for root. In my case, its rightful installation place is in ~/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler
You need to add the ruby gem executable directory to your path
export PATH=$PATH:/opt/ruby-enterprise-1.8.7-2010.02/bin
hi i am a big noob
i use gem install bundler to install bundle and i use bundle install to install my Gemfile
but bundle command not find
can someone help?
and another question
are bundler and bundle same or they are different thing?
No bundle shim; rbenv: bundle: command not found
bash: bundle: command not found
centos - gem install bundler, bundle not working - Unix & Linux Stack Exchange
command not found
I did a brew install imagemagick for image manipulation, and went to update my gemfile with image_processing and mini_magic gems, and then did a bundle install and it errors out.
I tried brew update and brew upgrade, and they ran but still getting an error on bundle install, see the below:
Mac-Users-Apple-Computer:sample_app_v6 z$ bundle Traceback (most recent call last): 31: from /Users/z/.rbenv/versions/2.6.3/bin/bundle:23:in `<main>' 30: from /Users/z/.rbenv/versions/2.6.3/bin/bundle:23:in `load' 29: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>' 28: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors' 27: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>' 26: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start' 25: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start' 24: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch' 23: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch' 22: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' 21: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 20: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:255:in `install' 19: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/settings.rb:124:in `temporary' 18: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:256:in `block in install' 17: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/install.rb:66:in `run' 16: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 15: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 14: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/installer.rb:4:in `<top (required)>' 13: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 12: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 11: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/dependency_installer.rb:4:in `<top (required)>' 10: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 9: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 8: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/package.rb:44:in `<top (required)>' 7: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 6: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 5: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/security.rb:12:in `<top (required)>' 4: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 3: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' 2: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/openssl.rb:13:in `<top (required)>' 1: from /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require' /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError) Referenced from: /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle Reason: image not found - /Users/z/.rbenv/versions/2.6.3/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle
I've done some google searching but it isn't clear
EDIT: I did see an SO answer saying to do the below (I'm on mac of course), brew remove openssl; brew install openssl, but get an error so am not sure if this is a safe route to try:
https://stackoverflow.com/questions/39051887/image-not-found-in-openssl-bundle-when-install-cocoapods-on-mac?noredirect=1&lq=1
Mac-Users-Apple-Computer:sample_app_v6 z$ brew remove openssl Error: Refusing to uninstall /usr/local/Cellar/openssl@1.1/1.1.1d because it is required by glib, httpie, imagemagick, krb5, libheif, mysql, postgresql, python, python@3.8, rbenv and shared-mime-info, which are currently installed. You can override this and force removal with: brew uninstall --ignore-dependencies openssl
EDIT 2: RESOLVED
moomaka had me uninstall and reinstall my particular version of ruby and eventually all is well. Details in comments below.
I had the same issue using zsh and this fixed it:
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshenv
$ echo 'eval "$(rbenv init -)"' >> ~/.zshenv
$ echo 'source $HOME/.zshenv' >> ~/.zshrc
$ exec $SHELL
You seem to be after installing bundler system-wide. To do this, you need to pass --no-user-install flag to gem and execute it with sudo:
sudo gem install bundler --no-user-install
After this, you should see bundle in /usr/bin/ just fine:
$ ls /usr/bin/bundle
/usr/bin/bundle*