I had RVM and RBENV installed on my computer and I decided to keep only RBENV So I followed this setup I am on mac with high sierra
The first trouble I am facing is that ruby -v
displays nothing.
I know that my ruby version is ok because of ohmyzsh [2.4.4]
When I try to run this command gem install rake bundler rspec rubocop pry pry-byebug hub colored octokit
nothing happens... I can't install bundler nor rails.... I am not supposed to use the sudo... What could be wrong and how could I find fix this?
I can't even launch irb
and gem install bundler
does nothing
there must be a conflict somewhere?
I ran this dignostic:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 320 100 320 0 0 858 0 --:--:-- --:--:-- --:--:-- 860
--- PATH ---
./bin:/Users/bill/.rbenv/shims:/usr/local/opt/rbenv/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/ImageMagick/bin:/usr/local/sbin
--- RBENV ---
rbenv is /usr/local/opt/rbenv/bin/rbenv
rbenv is /usr/local/bin/rbenv
system
* 2.4.4 (set by /Users/bill/.rbenv/version)
--- RUBY ---
ruby is /Users/bill/.rbenv/shims/ruby
ruby is /usr/bin/ruby
ruby is /usr/local/bin/ruby
--- GEM ---
gem is /Users/bill/.rbenv/shims/gem
gem is /usr/bin/gem
gem is /usr/local/bin/gem
--- POSTGRES ---
postgres is /usr/local/bin/postgres
postgres (PostgreSQL) 10.5
2018-09-11 17:04:51.406 CEST [30591] FATAL: database files are incompatible with server
2018-09-11 17:04:51.406 CEST [30591] DETAIL: The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.5.
See my .zshrc
ZSH=$HOME/.oh-my-zsh
# You can change the theme with another one:
# https://github.com/robbyrussell/oh-my-zsh/wiki/themes
ZSH_THEME="robbyrussell"
# Add ruby version on prompt (float right)
if [ -x "$(command -v rbenv)" ]; then RPS1='[$(ruby_prompt_info)]$EPS1'; fi
# Useful plugins for Rails development with Sublime Text
plugins=(gitfast brew rbenv last-working-dir common-aliases sublime zsh-syntax-highlighting history-substring-search)
# Prevent Homebrew from reporting - https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Analytics.md
export HOMEBREW_NO_ANALYTICS=1
# Actually load Oh-My-Zsh
source "${ZSH}/oh-my-zsh.sh"
# Rails and Ruby uses the local `bin` folder to store binstubs.
# So instead of running `bin/rails` like the doc says, just run `rails`
export PATH="./bin:${PATH}:/usr/local/sbin"
# Store your own aliases in the ~/.aliases file and load the here.
[[ -f "$HOME/.aliases" ]] && source "$HOME/.aliases"
# Encoding stuff for the terminal
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export BUNDLER_EDITOR="'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'"
export BUNDLER_EDITOR="'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'"
export BUNDLER_EDITOR="'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'"
eval "$(rbenv init -)"
Also ran this diganostic:
You seem to have multiple rbenv installs in the following locations.
Please pick just one installation and remove the others.
/usr/local/opt/rbenv/bin/rbenv
/usr/local/bin/rbenv
Checking for rbenv shims in PATH: OK
Checking `rbenv install' support: /usr/local/bin/rbenv-install (ruby-build 20180822)
Counting installed Ruby versions: 1 versions
Checking RubyGems settings: OK
Auditing installed plugins: %
here is a screenshot of my ~
maybe something needs to be removed ? what about that .rvmrc
it says rvm_auto_reload_flag=1
rvm_auto_reload_flag=2
I am opening the folders and files:
in .profile
it says:
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Clarify the "nothing happens"
~ gem install rake bundler rspec rubocop pry pry-byebug hub colored octokit
➜ ~
I fixed with:
brew update
brew upgrade
brew uninstall ruby