RubyMine with Cucumber - cannot debug
Hi
I am new to Cucumber and Ruby and am trying to evaluate RubyMine as an IDE for debugging Cucumber projects but I am struggling with it.
I've installed Mine on my MAC running OSX Yosemite 10.10.5 but I'm struggling with the debug side of things.
I'm not convinced I've installed all of the correct depedencies and would be greatful if some one could walk me through how to investigate the problem...
Any help appreciated
Brad
------------------------------------------------------------------------------------------------------------------
I've put this simple feature together:
Feature: Initial
Scenario Outline: Initial Scenario
Given I am using RubyMine
And I create a step reference
Then I should see the step definition prompt
and these simple steps:
Given(/^I am using RubyMine$/) do
puts "Step 1"
end
And(/^I create a step reference$/) do
puts "Step 2"
end
Then(/^I should see the step definition prompt$/) do
puts "Step 3"
end
------------------------------------------------------------------------------------------------------------------
When I try to run it in debug mode I see this output:
/usr/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/brad/.gem/ruby/2.0.0/gems/ruby-debug-ide-0.4.32/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 50625 --dispatcher-port 50626 -- /usr/bin/spork cucumber --bootstrap
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- debase_internals (LoadError)
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Gems/2.0.0/gems/debase-0.2.1/lib/debase.rb:4:in `<top (required)>'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/brad/.gem/ruby/2.0.0/gems/ruby-debug-ide-0.4.32/lib/ruby-debug-ide.rb:8:in `<top (required)>'
from /Users/brad/.gem/ruby/2.0.0/gems/ruby-debug-ide-0.4.32/bin/rdebug-ide:8:in `require_relative'
from /Users/brad/.gem/ruby/2.0.0/gems/ruby-debug-ide-0.4.32/bin/rdebug-ide:8:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
------------------------------------------------------------------------------------------------------------------
When I try running it from the command line I see this:
Bradleys-Mini:initial brad$ cucumber
Your project has loaded spork/ext/ruby-debug, which relies on the ruby-debug gem. It appears that ruby-debug is not installed. Please install it. (LoadError)
/Library/Ruby/Gems/2.0.0/gems/spork-0.9.2/lib/spork/ext/ruby-debug.rb:149:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/spork-0.9.2/lib/spork/ext/ruby-debug.rb:4:in `<top (required)>'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `require'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:39:in `require'
/Users/brad/RubymineProjects/initial/features/support/env.rb:4:in `<top (required)>'
/Users/brad/.gem/ruby/2.0.0/gems/cucumber-2.1.0/lib/cucumber/rb_support/rb_language.rb:99:in `load'
/Users/brad/.gem/ruby/2.0.0/gems/cucumber-2.1.0/lib/cucumber/rb_support/rb_language.rb:99:in `load_code_file'
/Users/brad/.gem/ruby/2.0.0/gems/cucumber-2.1.0/lib/cucumber/runtime/support_code.rb:232:in `load_file'
/Users/brad/.gem/ruby/2.0.0/gems/cucumber-2.1.0/lib/cucumber/runtime/support_code.rb:99:in `block in load_files!'
/Users/brad/.gem/ruby/2.0.0/gems/cucumber-2.1.0/lib/cucumber/runtime/support_code.rb:98:in `each'
/Users/brad/.gem/ruby/2.0.0/gems/cucumber-2.1.0/lib/cucumber/runtime/support_code.rb:98:in `load_files!'
/Users/brad/.gem/ruby/2.0.0/gems/cucumber-2.1.0/lib/cucumber/runtime.rb:262:in `load_step_definitions'
/Users/brad/.gem/ruby/2.0.0/gems/cucumber-2.1.0/lib/cucumber/runtime.rb:65:in `run!'
/Users/brad/.gem/ruby/2.0.0/gems/cucumber-2.1.0/lib/cucumber/cli/main.rb:32:in `execute!'
/Users/brad/.gem/ruby/2.0.0/gems/cucumber-2.1.0/bin/cucumber:8:in `<top (required)>'
/usr/bin/cucumber:23:in `load'
/usr/bin/cucumber:23:in `<main>'
------------------------------------------------------------------------------------------------------------------
So I tried to install ruby-debug:
Bradleys-Mini:~ root# gem install ruby-debug
Fetching: columnize-0.9.0.gem (100%)
Successfully installed columnize-0.9.0
Fetching: linecache-1.3.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing ruby-debug:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150927-2321-1eslskc.rb extconf.rb
Can't handle 1.9.x yet
*** 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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/linecache-1.3.1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/linecache-1.3.1/gem_make.out
请先登录再写评论。
Hi,
You need to install 'debase'. Just run command
gem install debase