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

后端 未结 4 1663
盖世英雄少女心
盖世英雄少女心 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:13

    gem update --system should fix you up. That will install the latest version of RubyGems.

    0 讨论(0)
  • 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.

    0 讨论(0)
  • 2021-02-11 00:18

    I had the same problem with XCode 4.3. Try this:

    Open XCode > Preferences > Downloads > Install Command Line Tools

    Finally run in the terminal:

    rvm install 1.9.3 --with-gcc=clang
    
    0 讨论(0)
  • 2021-02-11 00:18

    I got the same error with jquery-rails 2.0.3:

    Invalid gemspec in [C:/Ruby187/lib/ruby/gems/1.8/specifications/jquery-rails-2.0.3.gemspec]: invalid date format in specification: "2012-08-16 00:00:00.000000000Z"
    

    To fix that, I have edited the file C:/Ruby187/lib/ruby/gems/1.8/specifications/jquery-rails-2.0.3.gemspec and change the line containing:

    s.date = %q{2012-08-16 00:00:00.000000000Z}
    

    to

    s.date = %q{2012-08-16}
    

    then it works again.

    0 讨论(0)
提交回复
热议问题