la@la:~/myapp$ gem install json -v '1.8.6'
Fetching: json-1.8.6.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.3.0 directory.
la@la:~/myapp$
答案 0 :(得分:0)
转到项目的GEMFILE文件。编辑此文件并添加
gem 'json', '~> 1.8', '>= 1.8.6'
保存文件并转到终端,然后运行
bundle install
答案 1 :(得分:0)
要在系统中安装gem,您必须是超级用户。 要安装gem,请使用sudo运行它:
sudo gem install json -v '1.8.6'