After following instructions on this stackoverflow I was able to get it working on local machine. I even installed the gems on the deployment server and can run the server there locally.
Rails with ruby-debugger throw 'Symbol not found: _ruby_current_thread (LoadError)'
For deploying we are using Capistrano and the issue is that the Gemfile contains the following:
gem 'linecache19', '0.5.13', :path => "~/.rvm/gems/ruby-1.9.3-p#{RUBY_PATCHLEVEL}/gems/linecache19-0.5.13/"
gem 'ruby-debug-base19', '0.11.26', :path => "~/.rvm/gems/ruby-1.9.3-p#{RUBY_PATCHLEVEL}/gems/ruby-debug-base19-0.11.26/"
Because RUBY_PATCHLEVEL is different on server and my local machine it adds my local machines path to the Gemfile.lock and on the server it tries to find the gem there but it cant because the patch is different.
Below is the stack trace
You are trying to install in deployment mode after changing your Gemfile. Run bundle install
elsewhere and add the updated Gemfile.lock to version control.
You have added to the Gemfile:
* source: source at ~/.rvm/gems/ruby-1.9.3-p125/gems/ruby-debug-base19-0.11.26/
* source: source at ~/.rvm/gems/ruby-1.9.3-p125/gems/linecache19-0.5.13/
My local machine ruby version is 1.9.3-p194 and server has 1.9.3-p125. How can I fix this?