Problems installing the debugger in Rubymine

Hi everybody,

I need your help because I cannot install the ruby debugger in Rubymine. Rubymine attempts to install the ruby-debug-ide by asking:

"The gem ruby-debug-base19x required by the debugger is not currently installed. Would you like to install it?"


When I acknowledge this some installation process will start which unfortunately ends in an error message (I attached the full message in rubymine_error_message.txt).

Error installing ruby-debug-base19x-0.11.28.gem:
ERROR: Failed to build gem native extension.

[...]

Error installing linecache19:
ERROR: Failed to build gem native extension.

[...]


I've Ubuntu 11.04, Rubymine 3.2.3 and RVM with Ruby1.9.2-p290 installed. In detail my setup is as follows:

RubyGems Environment:
RUBYGEMS VERSION: 1.8.6
RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-linux]
INSTALLATION DIRECTORY: /home/ks/.rvm/gems/ruby-1.9.2-p290@global
RUBY EXECUTABLE: /home/ks/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
EXECUTABLE DIRECTORY: /home/ks/.rvm/gems/ruby-1.9.2-p290@global/bin
RUBYGEMS PLATFORMS:
  ruby
  x86_64-linux
GEM PATHS:
   /home/ks/.rvm/gems/ruby-1.9.2-p290@global
GEM CONFIGURATION:
   :update_sources => true
   :verbose => true
   :benchmark => false
   :backtrace => false
   :bulk_threshold => 1000
   :sources => ["http://rubygems.org"]
REMOTE SOURCES:
   http://rubygems.org
----------------------
IDE: JetBrains RubyMine 3.2.3, build #RM-107.494
OS: Linux 2.6.38-11-generic[amd64]
Java: 1.6.0_22-b22
RubyMine SDK Environment:
Sdk: RVM: ruby-1.9.2-p290 [global]
Sdk Version: ver.1.9.2p290 ( revision 32553) p290
Ruby Interpreter: /home/ks/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
RVM Sdk: yes, gemset:global
RVM Home: /home/ks/.rvm
Sdk Language Level: 1.9
Sdk Load Path:
     /home/ks/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1
     /home/ks/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/x86_64-linux
     /home/ks/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby
     /home/ks/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/vendor_ruby/1.9.1
     /home/ks/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/vendor_ruby/1.9.1/x86_64-linux
     /home/ks/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/vendor_ruby
     /home/ks/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1
     /home/ks/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-linux
     /home/ks/Software/RubyMine-3.2.3/rubystubs19
Sdk Gem paths:
     file:///home/ks/.rvm/gems/ruby-1.9.2-p290@global/bundler/gems
     file:///home/ks/.rvm/gems/ruby-1.9.2-p290@global/gems
Gems used for 'RubyMineProjects':



Thanks a lot in advance !!
Regards



Attachment(s):
rubymine_error_message.txt.zip
4 comments
Comment actions Permalink

Could you please try installing ruby-debug-base19x from command line via:
gem install ruby-debug-base19x --pre

0
Comment actions Permalink

Hi Dennis,

I did as you suggested and the command executes without an error. But...

Building native extensions.  This could take a while...
Successfully installed ruby-debug-base19x-0.11.30.pre2
1 gem installed
Installing ri documentation for ruby-debug-base19x-0.11.30.pre2...
Installing RDoc documentation for ruby-debug-base19x-0.11.30.pre2...


But when I start Rubymine again and select "debug", it will give me the same question:

"The gem ruby-debug-base19x required by the debugger is not currently installed. Would you like to install it?"


When I select "yes" the same errror message will come. Somehow it seems that Rubymine doesn't recognize the gem which has just been installed. My gem list reads as follows:

ks$ gem list

*** LOCAL GEMS ***

activemodel (3.1.0.rc6)
activerecord (3.1.0.rc6)
activesupport (3.1.0.rc6)
archive-tar-minitar (0.5.2)
arel (2.2.1)
bcrypt-ruby (2.1.4)
bio (1.4.1)
builder (3.0.0)
columnize (0.3.4)
flexmock (0.9.0)
i18n (0.6.0)
kwalify (0.7.2)
multi_json (1.0.3)
pg (0.11.0)
rake (0.9.2 ruby)
ruby-debug-ide (0.4.17.beta5)
ruby_core_source (0.1.5)
tzinfo (0.3.29)


Maybe you have another idea? That would be great!
Thanks!

Regards!

0
Comment actions Permalink

Hi Dennis,

I solved it for myself. Here is a quick summary of my fix and I hope that someone who has more knowledge can give a decent explanation for this behaviour:

1.) The main problem is that the following header files (vm_core.h and version.h) cannot be found

Error running main: Failed to install gems. Following gems were not installed:
/home/ks/Software/RubyMine-3.2.3/rb/gems/ruby-debug-base19x-0.11.28.gem:
Error installing ruby-debug-base19x-0.11.28.gem:
ERROR: Failed to build gem native extension.

/home/ks/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
checking for vm_core.h... yes
checking for version.h... no
checking for vm_core.h... yes
checking for version.h... no


2.) I located the sources of my Ruby installation (RVM) and copied all header and include files to the current Ruby include directory. In my case it is

cd ~/.rvm/src/ruby-1.9.2-p290

# if you are using a 64Bit Linux you should copy it to the following include directory:
cp *.h ~/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-linux/
cp *.inc ~/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-linux/

# if you are using a 32Bit Linux you should copy it to the following include directory:
cp *.h ~/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/
cp *.inc ~/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/


3.) After this, I tried to install the Debugger again via Rubymine but still received an error message saying that it could not find "version.h". Very strange because the file was definitely located in the include directory.
4.) Then, I opened versions.h in edit mode and located a strange line:

#include "ruby/version.h"



This is a C command for including a header file (not a Ruby comment!) and, moreover, it points to some wrong directory "ruby".

5.) I simply removed the line from the file, repeated the debugger installation via Rubymine and voila it worked!


I hope this will help some poor souls coming by!
As I said in my first sentence, maybe someone can comment on this solution and, hopefully, can explain why this line exactly had to be removed!

Thanks!

0
Comment actions Permalink

To clarify Kurt's post, that's 'version.h' (not 'versions.h') that includes the #include "ruby/version.h" line that you installed from the sources in /usr/local/include/ruby-1.9.1/{ruby include directory}, where 'ruby include directory might be ruby, ruby-version-patchlevel, or x86_64-linux depending upon your configuration.

He's right. It does work, and I can tell you that nothing else did work although I ddi get halfway there after fighting the vm_core.h and OpenSSL problems. :D

0

Please sign in to leave a comment.