4

I'm running into a segmentation fault when I do rake db:create in a

The error output is:

/home/[username]/.rvm/gems/ruby-1.9.2-p0/gems/sqlite3-1.3.3/lib/sqlite3/sqlite3_native.so: [BUG] Segmentation fault
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]

Aborted

I tried following the sample tutorial at http://guides.rubyonrails.org/getting_started.html and I get the same error with a brand new project.

chimeracoder
  • 20,648
  • 21
  • 60
  • 60
  • Did you install your gems with bundler? The mismatch of ruby versions brings this: http://yehudakatz.com/2010/08/24/a-tale-of-abort-traps-or-always-question-your-assumptions/ to mind (a longish read, but interesting). Try reinstalling your sqlite3 gem. You might want to update bundler and rvm first, or at least `rehash`. – matt May 20 '11 at 22:11
  • Ah, thanks for noticing that. I installed Rails a while ago, and I followed a tutorial somewhere to supposedly keep the versions matched through RVM, but I guess it didn't work. Do you know where I could find the correct way to uninstall/reinstall it and/or fix RVM? – chimeracoder May 20 '11 at 22:16
  • 3
    `gem uninstall sqlite3` followed by `bundle install` should work (if this is the problem). Do `rvm get latest`, `rvm reload` and `gem update bundle` first to be sure. – matt May 20 '11 at 22:28
  • Hmm, not quite. I was able to get rake db:create to work, but now rake db:migrate coughs up, with the exact same error message. ruby -v and which ruby both point to 1.9.2, so I'm not sure where 1.8.7 is getting thrown in there. – chimeracoder May 20 '11 at 23:38
  • Maybe your `GEM_HOME` is messed up somehow. Are you using the current version of `rvm`? There have been a few releases that were somewhat less than satisfactory. – tadman May 21 '11 at 00:09
  • Solved [here][1] [1]: http://stackoverflow.com/questions/6274409/rails-annotate-segmentation-fault/7985104#7985104 – dpaluy Nov 02 '11 at 18:06
  • I see the same problem. I tried the solution from @matt, still got the same error. – BlueDolphin May 20 '12 at 22:48
  • http://stackoverflow.com/questions/6274409/rails-annotate-segmentation-fault/7985104#7985104 solves my problem – BlueDolphin May 20 '12 at 23:46

1 Answers1

1

Instead you should probably try rake db:migrate

helicopter
  • 151
  • 5