ruby_threadptr_data_type error
Asked Answered
G

5

15

I'm starting up a new rails app with the latest version of rails (3.1.3). Rails crashes when I try to start up the server. First I fixed this bug, and now I'm getting this one

ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_threadptr_data_type 

There's a discussion about this going on here, but I can't make enough sense of it to get things to work.

UPDATE

I updated the version of ruby-debug

gem 'ruby-debug-base19x', '~> 0.11.30.pre4'

and have now moved on to this error

linecache19-0.5.12/lib/trace_nums19.so: undefined symbol: ruby_current_thread
Garamond answered 24/11, 2011 at 1:44 Comment(0)
G
33

Ok, it turns out that both ruby-debug and linecache needed to be manually updated to the latest versions. These lines in my gemfile did the trick

gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
gem 'ruby-debug-base19x', '~> 0.11.30.pre4'
gem 'ruby-debug19'

To run specs, you need to run bundle exec rspec -d spec

Garamond answered 24/11, 2011 at 2:31 Comment(6)
this is the same answer as the one by @Jakob_CosoroabaForjudge
@Forjudge - yeah, it is. This one was here for about a week before he gave his answer. Not sure why he duplicated it.Garamond
Doesn't work. Still have the same problem. Tried with required, and without git and version definition. The same.Elastic
This worked great for me on Ruby 1.9.3-p0 and Rails 3.2.0.rc2. Thanx!Takamatsu
Verified to be working with 1.9.3-p125 and OSX Lion. Why this is so hard to keep in line I have no idea. shakes fistFickle
@Fickle - yeah, when I posted this I never thought it would still be the right solution 5 months later.Garamond
E
4

At last I found the problem. The debugger in RubyMine starts without bundle exec, so it doesn't use linecache19 from git. You need to install it manually.

Resolution of the problem found here: http://youtrack.jetbrains.com/issue/RUBY-9418?projectKey=RUBY

gem uninstall linecache19
gem uninstall ruby-debug-base19x
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
gem install linecache19-0.5.13.gem
gem install ruby-debug-base19x –-pre

Make sure to uninstall all linecache19 and ruby-debug-base19x!

Elastic answered 5/1, 2012 at 16:54 Comment(0)
A
2

The following lines worked for me:

gem 'linecache19'
gem 'ruby-debug-base19x'
gem 'ruby-debug19', :require => 'ruby-debug'

(Hat tip to declan. His comment didn't work for me, but it gave me the idea to add linecache19.)

Attalanta answered 25/11, 2011 at 22:5 Comment(1)
I tried everything else as well and this was the only solution that solved my issue. For those updating to Ubuntu 12.04, ruby will be auto updated to 1.9.3p0.Scholl
P
0

after trying all advise on stackoverflow, the following combination worked for me

gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
gem 'ruby-debug-base19x', '~> 0.11.30.pre4'
gem 'ruby-debug19'

I'm running Rails 3.1.3 on Ruby 1.9.3-p0 with RVM

when I set :require => 'ruby-debug' the server would not start.

Polyhydric answered 30/11, 2011 at 10:48 Comment(0)
P
-1

It's repost from this

I also ran into this, and found the solution in Ruby 1.9.3 and ruby-debug. You need to install not-yet-officially-released versions of ruby-debug-base19 and linecache19. The currently released versions indeed cause the exception you had.

Use this gist.

#To install ruby-debug on Ubuntu ruby-1.9.3 you need to download from http://rubyforge.org/frs/?group_id=8883

linecache19-0.5.13.gem 
ruby_core_source-0.1.5.gem 
ruby-debug19-0.11.6.gem 
ruby-debug-base19-0.11.26.gem

#Then in your console

export RVM_SRC=/your/path/to/ruby-1.9.3
# Note, your source path should be something like /home/user/.rvm/src/ruby-1.9.3-p0

gem install archive-tar-minitar
gem install ruby_core_source-0.1.5.gem -- --with-ruby-include=/$RVM_SRC
gem install linecache19-0.5.13.gem -- --with-ruby-include=/$RVM_SRC
gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=/$RVM_SRC
gem install ruby-debug19-0.11.6.gem -- --with-ruby-include=/$RVM_SRC

I tried it and it's work!

This is solve of our problems.

Perla answered 7/12, 2011 at 10:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.