gem and/or Ruby on Rails broke all of a sudden, anyone know what happened?

后端 未结 4 1669
盖世英雄少女心
盖世英雄少女心 2021-02-10 23:44

I had a Ruby on Rails app that used to work. I hadn\'t used it in a month or so, but then tried starting it up today with rails s and got the following error—in fa

4条回答
  •  青春惊慌失措
    2021-02-11 00:18

    I'd try cleaning out all your installed gems by running

    rm -rf ~/.gems
    sudo rm -rf /Library/Ruby/Gems/*
    

    After this gem list should list no gems. Then run

    sudo gem update --system
    

    to ensure Ruby Gems is at the latest version. You'll then have to reinstall all your gems. (Probably gem install bundler followed by bundle install).

    By the way, you should check out rbenv or rvm for managing Ruby versions and keeping all your development gems separate from the system Ruby.

提交回复
热议问题