4

On this command RAILS_ENV=production bundle exec rake db:migrate

I'm getting this error :

 [BUG] Segmentation fault
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

I thought of trying this but the command won't execute as it doesn't know what is rvm:

rvm gemset empty
rvm use 1.9.2@skateparks
gem install bundler
bundle install
Sachin Prasad
  • 5,365
  • 12
  • 54
  • 101
  • what other output is produced? have you checked the crash log? – Alex Coplan Dec 17 '12 at 14:19
  • Most likely one of your native gems (e.g. database adapter?) may have gone ga-ga. Issue `ulimit -c unlimited` before your `rake db:migrate` then open the core in `gdb` (`gdb ruby core.1234`) and issue `bt` within `gdb` to see which module (and possibly which function, too) this is happening in. Can you temporarily switch to a pure-ruby gem if the crash happens in a native gem? – vladr Dec 17 '12 at 14:54
  • Where is the migration causing this? – Sully Dec 17 '12 at 16:22

1 Answers1

1

Make sure that RVM really works, in your ~/.bash_profile should be line like this:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

If it's not there, install it, basically this command is enough:

$ \curl -L https://get.rvm.io | bash -s stable --ruby

You shouldn't install RVM under root account, unless you know what you're doing. See https://rvm.io/rvm/install/ for more info.

For deployment is good idea to use capistrano.

Tombart
  • 30,520
  • 16
  • 123
  • 136