重複の可能性:
ruby_threadptr_data_type エラー
私は Ruby / Rails を初めて使用し、Ubuntu 12.04 で環境をセットアップする際に問題があります。rbenv を使用しています (rvm ではありません)。ルビーのインストール方法は次のとおりです。
# clone rbenv and the ruby-build plugin
git clone git://github.com/sstephenson/rbenv.git .rbenv
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
# initialize rbenv
export PATH=~/.rbenv/bin:$PATH
rbenv init -
# install ruby 1.9.2
rbenv install 1.9.2-p320
rbenv rehash
# change ruby version to 1.9.2
rbenv global 1.9.2-p320
次の hello-world アプリを実行しようとしています: https://github.com/renderedtext/base-app
ウェブサイトで推奨されているコマンドを実行しています
bundle install
bundle exec rake db:setup db:test:prepare
bundle exec rake spec
bundle exec rake cucumber
bundle exec rake spec
次のエラーで失敗します。
NOTICE: CREATE TABLE will create implicit sequence "roles_id_seq" for serial column "roles.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "roles_pkey" for table "roles"
NOTICE: CREATE TABLE will create implicit sequence "users_id_seq" for serial column "users.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users"
/home/ubuntu/.rbenv/versions/1.9.2-p320/bin/ruby -S rspec ./spec/models/role_spec.rb ./spec/models/user_spec.rb ./spec/controllers/admin/base_controller_spec.rb ./spec/controllers/admin/users_controller_spec.rb ./spec/controllers/pages_controller_spec.rb ./spec/helpers/pages_helper_spec.rb
No DRb server is running. Running in local process instead ...
/var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:422:in `rescue in debug=': (RuntimeError)
**************************************************
/var/lib/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_threadptr_data_type - /var/lib/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so
If you have it installed as a ruby gem, then you need to either require
'rubygems' or configure the RUBYOPT environment variable with the value
'rubygems'.
/var/lib/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `require'
/var/lib/gems/1.9.1/gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `<top (required)>'
/var/lib/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `require'
/var/lib/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `<top (required)>'
/var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:408:in `require'
/var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:408:in `debug='
/var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration_options.rb:20:in `block in configure'
/var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration_options.rb:19:in `each'
/var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration_options.rb:19:in `configure'
/var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:21:in `run'
/var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:66:in `rescue in run'
/var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:62:in `run'
/var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:10:in `block in autorun'
**************************************************
from /var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:407:in `debug='
from /var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration_options.rb:20:in `block in configure'
from /var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration_options.rb:19:in `each'
from /var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/configuration_options.rb:19:in `configure'
from /var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:21:in `run'
from /var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:66:in `rescue in run'
from /var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:62:in `run'
from /var/lib/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:10:in `block in autorun'
rake aborted!
/home/ubuntu/.rbenv/versions/1.9.2-p320/bin/ruby -S rspec ./spec/models/role_spec.rb ./spec/models/user_spec.rb ./spec/controllers/admin/base_controller_spec.rb ./spec/controllers/admin/users_controller_spec.rb ./spec/controllers/pages_controller_spec.rb ./spec/helpers/pages_helper_spec.rb failed
Tasks: TOP => spec
(See full trace by running task with --trace)
サーバーにはすでに ruby 1.9.1 がインストールされているようですが (おそらく apt-get を使用)、1.9.2 を使用したいので、rbenv をインストールしました。
補足として、1.9.3 で rbenv を使用してみましたが、同じエラーが発生しました。
他のスタック オーバーフローの質問 ( ruby_threadptr_data_type errorなど) からの回答を調査して適用しようとしましたが、segfault が発生しました。また、私の調査では、答えのほとんどは rvm と 1.9.3 に関連しているように見えました... rbenv と 1.9.2 ではありません
助けてください!