Ruby on Rails incompatible library

后端 未结 3 1613
南笙
南笙 2020-12-17 20:24

I\'ve just started to have a look at ruby on rails and can\'t get a server to run. I\'m running ruby 2.3.0 and rails 4.2.5 and after I have a new rail projects I try to run

相关标签:
3条回答
  • 2020-12-17 20:47

    Something's gotten weird/corrupted in your ruby environment. I'd blame rvm. Personally I am not a fan of rvm.

    But you might try gem uninstall json, follow prompts to uninstall ALL versions. Then bundle install again. Then hopefully you'll be fixed up.

    0 讨论(0)
  • 2020-12-17 20:47

    I had a similar problem to what you described after I had taken a different ruby version into use (from 2.3.0 -> 2.3.3).

    I found that running:

    $ gem install bundler
    

    Then:

    $ bundle install
    

    ... worked a charm for me. This reinstalled all of the packages I needed in my Gemfile without any dependency issues.

    0 讨论(0)
  • 2020-12-17 20:58

    It looks like a never version of json gem is already present and being picked up by rails. You could either remove the version manually:

    gem uninstall json -v 1.8.2
    

    or, since you're using RVM already, create a gemset specific to this project.

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