回答編集履歴

1

内容追記

2019/01/17 05:01

投稿

kazto
kazto

スコア7196

test CHANGED
@@ -15,3 +15,41 @@
15
15
  ```
16
16
 
17
17
  で選択していないので、次のgemコマンドがシステムのものを使ってしまっているものと推測できます。
18
+
19
+
20
+
21
+ ---
22
+
23
+
24
+
25
+ 追記:
26
+
27
+
28
+
29
+ [Bundler dir_s_mkdirで検索しました。](https://www.google.com/search?q=bundler+dir_s_mkdir)
30
+
31
+
32
+
33
+ 以下のような情報がありました。
34
+
35
+
36
+
37
+ [https://github.com/bundler/bundler/issues/4590#issuecomment-220343182](https://github.com/bundler/bundler/issues/4590#issuecomment-220343182)
38
+
39
+ [https://stackoverflow.com/questions/37232601/errnoeperm-operation-not-permitted-dir-s-rmdir/37233446#37233446](https://stackoverflow.com/questions/37232601/errnoeperm-operation-not-permitted-dir-s-rmdir/37233446#37233446)
40
+
41
+
42
+
43
+ 要約すると、「過去にsudoを使ってgemをインストールした場合、ファイルやディレクトリを作成できず、エラーになる」と言うことです。心当たりはおありでしょうか。
44
+
45
+ 以下を試してみていただけますでしょうか。
46
+
47
+ ```
48
+
49
+ sudo chown -R ユーザ名:staff ~/.rbenv
50
+
51
+ ののち、
52
+
53
+ gem install bundler
54
+
55
+ ```