エラー内容
An error occurred while installing bindex (0.8.1), and Bundler cannot continue.
Make sure that `gem install bindex -v '0.8.1' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
web-console was resolved to 3.7.0, which depends on
bindex
run bundle exec spring binstub --all
Could not find gem 'sqlite3' in any of the gem sources listed in your Gemfile.
Run `bundle install` to install missing gems.
解決方法
簡単に言うと権限の問題で自分に権限がないのが原因。
1.権限を確認(rootになっているのが原因)
$ ls -la
total 0
drwxr-xr-x 16 root staff 512 2 2 23:50 .
drwxr-xr-x 3 root staff 96 12 8 12:18 ..
drwxr-xr-x 6 root staff 192 12 8 12:36 bigdecimal-1.3.5
drwxr-xr-x 7 root staff 224 2 2 23:27 bigdecimal-1.4.3
drwxr-xr-x 5 root staff 160 2 2 23:50 bindex-0.5.0
drwxr-xr-x 6 root staff 192 2 2 23:28 date-2.0.0
drwxr-xr-x 6 root staff 192 12 8 12:36 etc-1.0.1
drwxr-xr-x 6 root staff 192 2 2 23:28 io-console-0.4.7
drwxr-xr-x 6 root staff 192 12 8 12:19 nio4r-2.3.1
drwxr-xr-x 6 root staff 192 2 2 23:33 nokogiri-1.10.1
drwxr-xr-x 6 root staff 192 12 8 12:19 nokogiri-1.8.5
drwxr-xr-x 6 root staff 192 12 8 12:37 openssl-2.1.2
drwxr-xr-x 6 root staff 192 12 8 12:37 psych-3.0.3
drwxr-xr-x 6 root staff 192 2 2 23:33 psych-3.1.0
drwxr-xr-x 5 root staff 160 12 8 16:58 stringio-0.0.2
drwxr-xr-x 5 root staff 160 12 8 12:19 websocket-driver-0.7.0
2.権限を自分にうつす
$ sudo chown -R username /Users/username/.rbenv
$ sudo chown -R {username}:staff /Users/{username}/.rbenv