RubyMine debug issue?

I am trying to learn Ruby on Rails. I purchased Ruby Mine and installed it on Ubuntu. I followed the installation instructions and when I tried to debug my first project in RubyMine, I get this:

>     Error running Development: test001: Failed to install gems.
> Following gems were not installed: linecache19 (0.5.12): Error
> installing linecache19: ERROR: Failed to build gem native extension.
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb ***
> extconf.rb failed *** Could not create Makefile due to some reason,
> probably lack of necessary libraries and/or headers. Check the
> mkmf.log file for more details. You may need configuration options.
> Provided configuration options: --with-opt-dir --without-opt-dir
> --with-opt-include --without-opt-include=${opt-dir}/include
> --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog
> --without-make-prog --srcdir=. --curdir
> --ruby=/home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require': no such file to load -- openssl (LoadError) from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require' from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/https.rb:92:in
> ` ' from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require' from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require' from
> /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:11:in
> ` ' from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require' from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require' from
> /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:6:in
> ` ' from  rubygems/custom_require>:33:in `require' from
> rubygems/custom_require>:33:in `rescue in require' from
> rubygems/custom_require>:29:in `require' from extconf.rb:2:in ` ' Gem
> files will remain installed in
> /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/linecache19-0.5.12
> for inspection. Results logged to
> /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out
> /home/stormkiernan/Downloads/RubyMine-3.2.4/rb/gems/ruby-debug-base19x-0.11.30.pre2.gem:
> Error installing ruby-debug-base19x-0.11.30.pre2.gem: ERROR: Failed to
> build gem native extension.
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb ***
> extconf.rb failed *** Could not create Makefile due to some reason,
> probably lack of necessary libraries and/or headers. Check the
> mkmf.log file for more details. You may need configuration options.
> Provided configuration options: --with-opt-dir --without-opt-dir
> --with-opt-include --without-opt-include=${opt-dir}/include
> --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog
> --without-make-prog --srcdir=. --curdir
> --ruby=/home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require': no such file to load -- openssl (LoadError) from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require' from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/https.rb:92:in
> ` ' from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require' from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require' from
> /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:11:in
> ` ' from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require' from
> /home/stormkiernan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
> `require' from
> /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:6:in
> ` ' from  rubygems/custom_require>:33:in `require' from
> rubygems/custom_require>:33:in `rescue in require' from
> rubygems/custom_require>:29:in `require' from extconf.rb:2:in ` ' Gem
> files will remain installed in
> /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/linecache19-0.5.12
> for inspection. Results logged to
> /home/stormkiernan/.rvm/gems/ruby-1.9.2-p290@global/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out

Now, just prior to this error, I was prompted with:

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

I responded "Yes", and it attempted (and I assume failed) to download whatever necessary dependencies the software needed. The window title was "Installing Gems". It was immediately after this window closed that I received the above error.

What do I need to do?

3 comments
Comment actions Permalink

I understand. It can be confusing at times.

Usually, I don't let RubyMine install the gem dependencies. That's is handled effectively by bundler and Gemfile.
My suggestion (most of the commands are on the command line):
1. Install rvm and get used to it. It's just the way Rails developers (should) work.
2. Install rails in global gem using gem install rails.
3. rails new myapp. This creates the Gemfile.
4. gem install bundler. This is a key step.
5. bundle install. This installs all dependencies.  Your Gemfile should have the following at the minimum (to be able to debug via RM):

gem 'rails'
gem 'sqlite3'
group :development, :test do
  gem 'ruby-debug-ide'
  gem 'ruby-debug19'
  gem 'ruby-debug-base19x'
end


6. With the step above, RM does not/should not complain that you don't have latest ruby-debug-ide support. If and when it does, you should go back to command line and do bundle update.

And now you should open the folder in RM and do the development/debugging.

HTH,

Kedar
0
Comment actions Permalink

I did:

$ sudo gem install rails

and there were a few lines that mentioned "file 'lib' not found"

then I did:

$ rails new myapp

which printed:

The program 'rails' is currently not installed.  You can install it by typing:
sudo apt-get install rails



and then i retried the install and got:

$ sudo gem install rails
Successfully installed rails-3.1.0
1 gem installed
Installing ri documentation for rails-3.1.0...
file 'lib' not found
Installing RDoc documentation for rails-3.1.0...
file 'lib' not found



I didn't think I should install rails using sudo apt-get because it isnt using RVM..
0
Comment actions Permalink

You are right, installing rails via apt-get is not using rvm. To install rails into your rvm sdk you should do
rvm use 1.9.2
gem install rails
One question about debug gems installation. Could you please try installing it from command line:
rvm use 1.9.2
gem install ruby-debug-base19x --pre
and post the results?

0

Please sign in to leave a comment.