RubyMine does not stop on breakpoint (Rails 3.1.0 Ruby 1.8.7)

Hey,

I'm moving app from Rails 2.3.5 to Rails 3.1.0. With Rails 2.3.5 everything is working fine regarding breakpoints and debugging but in Rails 3.1.0 gemset
RubyMine simply does not stop on breakpoint.

I'm using following:
RubyMine 2.3.4
Rails 3.1.0
Ruby 1.8.7 p330
ruby-debug-base (0.10.5.jb2)
ruby-debug-ide (0.4.17.beta8)

When I start server in debug mode here is output:
Fast Debugger (ruby-debug-ide 0.4.17.beta8, ruby-debug-base 0.10.5.jb2) listens on 127.0.0.1:53973
Using AdapterExtensions
=> Booting Mongrel
=> Rails 3.1.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server

What might be wrong?

Thanks,
Sinisa.

11 comments
Comment actions Permalink

Do you have any mentions of ruby-debug in your Gemfile?

0
Comment actions Permalink

Yup, here it is:
gem 'ruby-debug', '0.10.3'

0
Comment actions Permalink

I would suggest you removing it as a workaround and see of breakpoints work. We're trying to resolve this problem in future versions of ruby-debug-ide gem

0
Comment actions Permalink

Unfortunatelly this does not solve the problem. Same behaviour here.

Here is my Gemfile:

source "http://rubygems.org"
source "http://gems.github.com"

gem "rails", "3.1.0"
gem "mysql2"
gem "json"
gem 'jquery-rails'

gem "mongrel", "1.1.5"
gem "mongrel_cluster", "1.0.5"
gem "haml", "~> 3.1"

gem "adapter_extensions", "0.5.0"

gem "geoip", "0.8.0"
gem "soap4r", "1.5.8"
gem "adwords4r", "19.4.0"
gem "aws-s3", "0.6.2"
gem "image_science", "1.1.3"
gem "mislav-will_paginate", "2.3.2"
gem 'tobi-delayed_job', '1.7.0'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails', "  ~> 3.1.0"
  gem 'coffee-rails', "~> 3.1.0"
  gem 'uglifier'
  gem 'compass', '~> 0.12.alpha'
end

group :development do
  gem "httparty", "0.5.0" # for Campfire API
  gem "capistrano-ext", "1.2.1"
  gem "ruby-debug-base"
  gem "ruby-debug-ide"
end

group :test do
  gem "shoulda", "2.11.3"
  gem "shoulda_routing_macros"
  gem "flexmock", "0.8.6"
end

0
Comment actions Permalink

Do you have any non-ASCII characters in the path of your application?

0
Comment actions Permalink

Nope. Path is ok.

0
Comment actions Permalink

Seems this has nothing with Rails 3.1. This problem is related to project settings. After creating new Rails 3 project and copy/paste all my models/controllers/migrations...
debug was working. So, only difference between my original project and new one was .idea folder.
Problem was solved by deleting .idea folder and loading project from file where new .idea folder with all settings was created.
Possible causes for this problem can be:
- I created new project via 'Check out from Version Control' and I guess something goes wrong there when generating project settings
- my project name is different than projects  folder name

Hope this will help someone with similar problem.

Regards,
Sinisa.

0
Comment actions Permalink

Ok, so I found where is the problem.
Since I'm using symlink for my RubyMine workspace folder when I open project using symlink debugger is not working.
When I use full path to symlink location than debugger is working.

For example:
/Documents/RubyMine_Workspace is linked to -> /Volumes/Mac1 Partition/Documents/RubyMine_Workspace

So if I open project like this:
/Documents/RubyMine_Workspace/test_project -> debugger is not working

If I open project like this:
/Volumes/Mac1 Partition/Documents/RubyMine_Workspace/test_project -> debugger is working!!!

Best,
Sinisa.

0
Comment actions Permalink

Using symlinks is known to cause problems with debugger:
http://youtrack.jetbrains.net/issue/RUBY-3251.

0
Comment actions Permalink

It's pity that no one pointed me to that bug and I lost half of day for it.
But ok, I still like your product.

Sinisa.

0
Comment actions Permalink

BTW - Symlinks were also the reason for misfunctioning coverage collection.

(My setup  Rails 3.0.8, Ruby 1.9.2, Rspec 2.8.0, simplecov 0.5.4)

Glad you pointed me in that direction.

0

Please sign in to leave a comment.