![](/img/trans.png)
[英]An error occurred while installing json (1.8.1), and Bundler cannot continue - Rails
[英]An error occurred while installing json (1.8.6), and Bundler cannot continue
較舊版本的 json gem 與較新的 ruby 存在一些不兼容。 嘗試更新 json gem bundle update json
這可以通過執行以下操作來解決
1.運行以下命令安裝ruby開發環境(Linux機器)。
sudo apt-get install ruby
ruby -e 'puts RUBY_VERSION[/\d+\.\d+/]' -dev
閱讀這篇文章了解更多詳情。
2.現在通過運行以下命令安裝json -v '1.8.6'
gem。
sudo gem install json -v '1.8.6'
這應該可以解決問題。 現在嘗試運行bundle update
和bundle install
,它應該可以正常工作。
感謝@TomLord和@Haider Ali的投入。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.