无需 root 安装 Jekyll [英] Installing Jekyll without root

查看:30
本文介绍了无需 root 安装 Jekyll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在共享服务器上建立一个 jekyll 博客.当我尝试安装 Jekyll 时,我得到你没有写权限".如何在没有 root 或 sudo 的情况下解决此问题?

I want to set up a jekyll blog on a shared server. When I try to install Jekyll I get "You don't have write permissions". How do I fix this without root or sudo?

更多细节:

我在共享服务器上有空间,但没有 root 访问权限.我无法安装 Ruby,尽管托管公司应我的要求安装了它.

I have space on a shared server and don't have root access. I couldn't install Ruby, though the hosting company installed it upon my request.

当我尝试安装 Jekyll 时,我会使用

When I try to install Jekyll I use

user@hosting.org [~]# gem install jekyll

这是我得到的回应:

ERROR:  While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/lib/ruby/gems/1.8 directory.

我已经看到了改变 GEMPATH 的不同建议,包括

I have seen different suggestions for changing the GEMPATH which I have tried including

export GEM_PATH=/home/user/something

但即使这样做了

gem env 

还是有结果

GEM PATHS:
- /usr/lib/ruby/gems/1.8
- /home/user/.gem/ruby/1.8

有什么建议吗?是否可以在没有 root 或 sudo 权限的情况下安装 jekyll,或者我只是犯了一些新手 PATH 错误?

Any tips? Is it possible to install jekyll without root or sudo priviliges or am I just making some rookie PATH error?

推荐答案

一时没找到答案.在#jekyll IRC 上,一位用户将我指向 Arch wiki我发现问题是强制以单个用户身份安装:

I didn't find the answer for a while. on the #jekyll IRC a user pointed me at the Arch wiki and I discovered that the thing is to force the install as a single user:

gem install jekyll --user-install

这篇关于无需 root 安装 Jekyll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆