LoginSignup
3
2

More than 5 years have passed since last update.

RubyMineでデバッグモードを使おうとしたら、Permission ErrorでGem Installができず起動できない問題の解決方法

Last updated at Posted at 2018-09-07

※ 最近VSCode → RubyMine(Jetbrains)に乗り換えはじめました。すごくいい感じです。

環境:
Mac OS High Sierra 10.13.3(17D47)

RubyMineはデバッグ機能を使うときに debaseruby-debug-ide を自動インストールしてくれるが、

Permission Errorで以下のエラーが出ていた。

Error running 'Development: wedding-x': Failed to Install Gems. Following gems were not installed: /Applications/RubyMine.app/Contents/rb/gems/debase-0.2.3.beta2.gem: While executing gem ... (Errno::EACCES) Permission denied @ dir_s_mkdir - /Users/myname/.anyenv/envs/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-17/2.2.0-static/debase-0.2.3.beta2 Building native extensions. This could take a while... /Applications/RubyMine.app/Contents/rb/gems/ruby-debug-ide-0.7.0.beta6.gem: While executing gem ... (Errno::EACCES) Permission denied @ dir_s_mkdir - /Users/myname/.anyenv/envs/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-17/2.2.0-static/ruby-debug-ide-0.7.0.beta6 Building native extensions. This could take a while...

該当のディレクトリに行ってみると

cd ~/.anyenv/envs/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/extensions:
ls -l
drwxr-xr-x  3 root  staff  96 Jun 24 21:11 x86_64-darwin-17

x86_64-darwin-17 のディレクトリだけ rootになっていた。
いつかのMacのバージョンからデフォルトがこうなった模様。
ここの権限を手動で自ユーザーに変えるとインストールできるようになる。

sudo chown -R myname .

参考:
RubyMineでデバッグモードが動かなかった
http://jnst.hateblo.jp/entry/2016/08/12/215438

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2