1

I am new to Ruby and RubyMine but I have tried essentially everything I have found online but can't get the debugger to work in RubyMine, keep getting the following error:

Error running 'simple_array_sum': Failed to Install Gems. Following gems were not installed: /Applications/RubyMine.app/Contents/rb/gems/ruby-debug-ide-0.6.1.beta9.gem: Error installing ruby-debug-ide-0.6.1.beta9.gem: ERROR: Failed to build gem native extension. current directory: /Users/ruskindantra/.gem/ruby/2.3.0/gems/ruby-debug-ide-0.6.1.beta9/ext /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby mkrf_conf.rb Installing base gem Permission denied @ dir_s_mkdir - /Library/Ruby /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:253:in `mkdir' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:253:in `fu_mkdir' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:227:in `block (2 levels) in mkdir_p' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:225:in `reverse_each' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:225:in `block in mkdir_p' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:211:in `each' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:211:in `mkdir_p' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/installer.rb:691:in `verify_gem_home' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/installer.rb:811:in `pre_install_checks' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/installer.rb:278:in `install' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/resolver/specification.rb:97:in `install' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/request_set.rb:166:in `block in install' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/request_set.rb:156:in `each' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/request_set.rb:156:in `install' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/dependency_installer.rb:405:in `install' mkrf_conf.rb:35:in `rescue in ' mkrf_conf.rb:28:in ` ' rake failed, exit code 1 Gem files will remain installed in /Users/ruskindantra/.gem/ruby/2.3.0/gems/ruby-debug-ide-0.6.1.beta9 for inspection. Results logged to /Users/ruskindantra/.gem/ruby/2.3.0/extensions/universal-darwin-17/2.3.0/ruby-debug-ide-0.6.1.beta9/gem_make.out

Can anyone please help?

3
  • try github.com/deivid-rodriguez/byebug Commented Oct 28, 2017 at 11:15
  • Not quite what I am looking for @SachinSingh :( Commented Oct 28, 2017 at 11:38
  • Looks like a permissions problem: Installing base gem Permission denied @ dir_s_mkdir - /Library/Ruby /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/fileutils.rb:253:in mkdir'`. Can you use a different login that has write privileges for the directory in question? Commented Oct 28, 2017 at 13:07

2 Answers 2

1

The problem is that RubyMine is pointing at the system version of Ruby. I would recommend starting with a Ruby version manager of some sort, such as rbenv

From there, you can install a version Ruby under your home directory using the version manager, and then tell RubyMine to point to it (Preferences -> Languages & Frameworks -> Ruby SDK and Gems -> [pick the version manager-installed Ruby you installed].

This may be a bit involved if you're just getting started, but it avoids polluting the gems folder of the system version of Ruby.

Sign up to request clarification or add additional context in comments.

Comments

0

This is what worked for me:

  • Updated rubymine with toolbox to the newest version

  • Click "debug" on your app once you set up your configuration

  • Get the following error message:

    enter image description here

  • Go to the problematic directory (in this case /Users/lizzie/.gem/ruby/2.7.0)

  • Click "Get Info" on the directory: 

    enter image description here

  • Click the lock button on the bottom right and put in your password, give everyone read & write access, and finally click the action menu and select "Apply to enclosed folders":

    enter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.