Rails Annotate Segmentation Fault

感情迁移 提交于 2019-12-02 17:23:16

问题


There are a handful of questions that sort of skirt around this question, but nothing that really gets to what I'm looking for.

After I bundle install my Gemfile, listed below, I run annotate and come up with the following error:

/Users/nickcoelius/.rvm/gems/ruby-1.8.7-p334@nick/gems/sqlite3-ruby-1.3.2/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10]

Abort trap

I'm running ruby 1.8.7, rails 3.0.7, and Mac OS 10.6.7. Thoughts?

Ruby -v: ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10] Rails -v: Rails 3.0.7

Gem list:

abstract (1.0.0)
actionmailer (3.0.7)
actionpack (3.0.7)
activemodel (3.0.7)
activerecord (3.0.7)
activeresource (3.0.7)
activesupport (3.0.7)
annotate (2.4.0)
annotate-models (1.0.4)
arel (2.0.10)
builder (2.1.2)
bundler (1.0.14)
diff-lcs (1.1.2)
erubis (2.6.6)
i18n (0.5.0)
mail (2.2.19)
mime-types (1.16)
nokogiri (1.4.4)
polyglot (0.3.1)
rack (1.2.3)
rack-mount (0.6.14)
rack-test (0.5.7)
rails (3.0.7)
railties (3.0.7)
rake (0.9.2, 0.8.7)
rspec (2.5.0)
rspec-core (2.5.2)
rspec-expectations (2.5.0)
rspec-mocks (2.5.0)
rspec-rails (2.5.0)
spork (0.9.0.rc5)
sqlite3-ruby (1.3.2)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.27)
webrat (0.7.3)

回答1:


This error probably were caused by some rvm crash. I had the same problem and after a hour Googling, I found the following solution:

  1. Uninstall all gems: gem list | cut -d" " -f1 | xargs gem uninstall -aIx
  2. gem install rake
  3. gem install bundler
  4. bundle install

Now it should work




回答2:


Why don't you try bundle exec annotate?



来源:https://stackoverflow.com/questions/6274409/rails-annotate-segmentation-fault

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!