Installing debase gem (for debugging): Permission error
Since I need the ruby-debug-ide-0.4.22 gem to start debugging, Rubymine tried to install it with the errors below:
1:43:26 PM Error running Development: fam: Failed to Install Gems. Following gems were not installed:
/home/bitnami/RubyMine-6.0.3/rb/gems/debase-0.0.9.gem: Error installing debase-0.0.9.gem:
ERROR: Failed to build gem native extension. /opt/bitnami/ruby/bin/ruby extconf.rb checking for vm_core.h... no checking for vm_core.h... no checking for vm_core.h... yes creating Makefile make "DESTDIR=" compiling breakpoint.c compiling locker.c compiling context.c compiling debase_internals.c linking shared-object debase_internals.so make "DESTDIR=" install /usr/bin/install -c -m 0755 debase_internals.so /opt/bitnami/ruby/lib/ruby/site_ruby/2.1.0/x86_64-linux /usr/bin/install: cannot create regular file `/opt/bitnami/ruby/lib/ruby/site_ruby/2.1.0/x86_64-linux/debase_internals.so': Permission denied make: *** [install-so] Error 1 Gem files will remain installed in /home/bitnami/.gem/ruby/2.1.0/gems/debase-0.0.9 for inspection. Results logged to /home/bitnami/.gem/ruby/2.1.0/gems/debase-0.0.9/ext/gem_make.out
/home/bitnami/RubyMine-6.0.3/rb/gems/ruby-debug-ide-0.4.22.gem: Error installing ruby-debug-ide-0.4.22.gem:
ERROR: Failed to build gem native extension. /opt/bitnami/ruby/bin/ruby mkrf_conf.rb Installing base gem You don't have write permissions for the /opt/bitnami/ruby/lib/ruby/gems/2.1.0 directory. /opt/bitnami/ruby/lib/ruby/site_ruby/2.1.0/rubygems/installer.rb:586:in `verify_gem_home' /opt/bitnami/ruby/lib/ruby/site_ruby/2.1.0/rubygems/installer.rb:750:in `pre_install_checks' /opt/bitnami/ruby/lib/ruby/site_ruby/2.1.0/rubygems/installer.rb:207:in `install' /opt/bitnami/ruby/lib/ruby/site_ruby/2.1.0/rubygems/dependency_installer.rb:371:in `block in install' /opt/bitnami/ruby/lib/ruby/site_ruby/2.1.0/rubygems/dependency_installer.rb:331:in `each' /opt/bitnami/ruby/lib/ruby/site_ruby/2.1.0/rubygems/dependency_installer.rb:331:in `each_with_index' /opt/bitnami/ruby/lib/ruby/site_ruby/2.1.0/rubygems/dependency_installer.rb:331:in `install' mkrf_conf.rb:34:in `rescue in ' mkrf_conf.rb:27:in `' Gem files will remain installed in /home/bitnami/.gem/ruby/2.1.0/gems/ruby-debug-ide-0.4.22 for inspection. Results logged to /home/bitnami/.gem/ruby/2.1.0/gems/ruby-debug-ide-0.4.22/ext/gem_make.out
(show balloon)
I think the first error is:
/usr/bin/install: cannot create regular file `/opt/bitnami/ruby/lib/ruby/site_ruby/2.1.0/x86_64-linux/debase_internals.so': Permission denied
Which is a plain file permission error. Well, that seems logical to me since the ruby interpreter and gems are managed by root. And since I have a regular user account in which i installed rubymine, the IDE cant install whatever it wants to. Luckily I am blessed with sudo permissions to install gems.
So I tried to install it in my console with
gem install debase-0.0.9
ERROR: Could not find a valid gem 'debase-0.0.9' (>= 0) in any repository
Does that gem come from a jetbrains repo? How can I add that repo?
Or can I use the IDE to install a gem with sudo?
PS. The machine is a VM from bitnami which was preconfigured with a rubystack.
请先登录再写评论。
Hi,
correct command is "gem install debase -v 0.0.9"
Regards, Oleg.
Thanks a lot. You are awarded the Help-A-Newbie badge!
You are welcome.
This took me like 6 hours to debug, tried uninstalling & reinstalling gems as well as a million other things. 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:
-Click "Get Info" on the directory.
-Go to the problematic directory (in this case /Users/lizzie/.gem/ruby/2.7.0)