【问题标题】:Ruby on Rails bundler JSON error [duplicate]Ruby on Rails 捆绑器 JSON 错误 [重复]
【发布时间】:2017-10-27 18:31:15
【问题描述】:

所以在进行捆绑安装时,我收到一条 JSON 错误提示

An error occurred while installing json (1.8.6), and Bundler cannot
continue.
Make sure that `gem install json -v '1.8.6'` succeeds before bundling.

那我试试

gem install json -v 1.8.6

但它会吐出来

ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.3.0 directory.

为什么会这样,为什么我不能捆绑安装

【问题讨论】:

    标签: ruby-on-rails json ruby installation bundle


    【解决方案1】:

    根据https://stackoverflow.com/a/2619731/1949363 中的答案,尝试将您的 GEMPATH 更改为您的用户可以访问的位置。您可以使用sudo,但以后可能会导致访问问题。

    export GEM_HOME=~/.gem
    export GEM_PATH=~/.gem
    

    【讨论】:

      猜你喜欢
      • 2015-01-30
      • 2020-10-27
      • 2011-07-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-26
      • 2018-05-09
      • 2012-01-02
      相关资源
      最近更新 更多