新手问题 Mina deploy to Ubuntu, but an error about json.

zhangst23 · 2016年04月06日 · 最后由 lana 回复于 2016年04月07日 · 2098 次阅读

这是我在 so 上说的问题,没有人回答,我贴到社区来看看有人遇到过吗?下面可能有用英文表述的,都很简单凑合着能看。

I use Mina deploy to ubuntu, but an error about json. 我使用 Mina 部署网站,出现了 ubuntu 系统 安装 gem 的问题

An error occurred while installing json (1.8.3), and Bundler cannot continue. Make sure that gem install json -v '1.8.3' succeeds before bundling. ! ERROR: Deploy failed. -----> Cleaning up build Unlinking current OK ! Command failed. Failed with status 1 (19)


我的 3 个做法

1 sudo apt-get install libgmp-dev but not work.

root@iZ28nb9h6ovZ:~# sudo apt-get install libgmp-dev
     Reading package lists... Done
     Building dependency tree
     Reading state information... Done
     libgmp-dev is already the newest version.
     The following packages were automatically installed and are no longer      required:

2 delete Gemfile.lock, and bundle , then mina deploy, but not work.

3 On my VPS. root@iZ28nb9h6ovZ:~# gem install json -v '1.8.3'

Building native extensions.  This could take a while...
    Successfully installed json-1.8.3
    Parsing documentation for json-1.8.3
    Installing ri documentation for json-1.8.3
    Done installing documentation for json after 3 seconds
1 gem installed

上面 3 个方法用过后,使用 mina deploy 后 json 的问题还存在。

代码格式化。

#1 楼 @rei 正在手机上弄,pc 端 js 加载不出来,网站乱码,麻烦了

  1. root 用户不需要 sudo 了
  2. 什么 Ruby(gem)管理工具? RVM Rbenv ChRuby ……?
需要 登录 后方可回复, 如果你还没有账号请 注册新账号