Debugging With Rake Spec

I am new to Ruby/RubyMine and have been having trouble figuring out how to debug inside RubyMine when I am using the 'rake spec' command via the Terminal to test my Rspec tests. How do I do the equivalent inside RubyMine? I had searched on the community forums and through the documentation but unable to find this specific case...

Thanks for the help!

6 comments
Comment actions Permalink

Hi,

I'm not sure I've correctly understand the question but it looks like you actually have two:
how to run rake/rspec in RubyMine? and how to debug something I know how to run in RubyMine?
I'd suggest to check https://www.jetbrains.com/ruby/help/rspec.html it describes how to run/debug specs.
If you do want to run/debug "rake spec" then check https://www.jetbrains.com/ruby/help/rake.html

Hope this helps, Oleg.

0
Comment actions Permalink

I followed the link you sent me (https://www.jetbrains.com/ruby/help/running-rake-tasks.html) for running a rake test and I was not seeing the 'Run Rake Task' option. I did not put my Rakefile inside lib/tasks because it did not appear for a 'Rakefile' to go there. What am I doing wrong? Thanks!
Screen Shot 2015-06-24 at 9.33.07 AM.png

0
Comment actions Permalink

Hi,

RubyMine exprts to have Rakefile in the root of the project.  Looking at your screenshot I'd say that "launch" should be opened as separate project to make Rake intefration working.

Regards, Oleg.

0
Comment actions Permalink

So I tried to run a basic test (took it from this example I was watching on YouTube: https://www.youtube.com/watch?v=TZmlUIxivzg see 01:30) and the attached screenshot shows that I am unable to even run a basic print statement test in RubyMine. Any thoughts?

After playing with a basic HelloWorld RubyMine example, it appears that Rspec alone works fine but I believe using Serverspec is my issue.

Thanks for your help!



Attachment(s):
Screen Shot 2015-06-24 at 10.09.25 AM.png
0
Comment actions Permalink

Can you also clarify why you think 'launch' should be its own project? I don't think that makes sense.

0
Comment actions Permalink

Hi,

RubyMine has some expectations about project structure.  E.g. Gemfile and Rakefile are supposed to be in the root directory of the project (as it usually in any ruby project)
The directory structure you show doesn't look like such project, but "launch" directory does.  This is why I'd recommend to open that directory as a project.

Regards, Oleg.

0

Please sign in to leave a comment.