Sachin Prasad
Sachin Prasad

Reputation: 5411

Segmentation fault ruby 1.8.7 on db migrate in rails

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

Upvotes: 4

Views: 616

Answers (1)

Tombart
Tombart

Reputation: 32428

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.

Upvotes: 1

Related Questions