gpt4 book ai didi

ruby - jekyll 安装 ubuntu : gem verification

转载 作者:数据小太阳 更新时间:2023-10-29 08:00:09 25 4
gpt4 key购买 nike

我正在关注 this tutorial允许在我的 Droplet 上托管 Jekyll。我的机器上一切正常,现在要在 digital ocean 上设置一切。

apt-get install git-core
curl -L https://get.rvm.io | bash -s stable --ruby=2.0.0

到目前为止还不错:

# sudo gem install jekyll
Successfully installed jekyll-1.3.0
1 gem installed
Installing ri documentation for jekyll-1.3.0...
Installing RDoc documentation for jekyll-1.3.0...

然后当我尝试用 jekyll 做某事时出现错误:

root@jackrabbit:~# jekyll
/usr/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find jekyll (>= 0) amongst [bundler-1.3.5, bundler-unload-1.0.2, executable-hooks-1.2.6, liquid-2.5.4, rake- 10.1.0, rubygems-bundler-1.4.2, rvm-1.11.3.8] (Gem::LoadError)
from /usr/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /usr/lib/ruby/1.9.1/rubygems.rb:1231:in `gem'
from /usr/local/bin/jekyll:22:in `<main>'

我检查了 gem 列表:

root@jackrabbit:~# gem list

*** LOCAL GEMS ***

bigdecimal (1.2.0)
bundler (1.3.5)
bundler-unload (1.0.2)
executable-hooks (1.2.6)
io-console (0.4.2)
json (1.7.7)
liquid (2.5.4)
minitest (4.3.2)
psych (2.0.0)
rake (10.1.0, 0.9.6)
rdoc (4.0.0)
rubygems-bundler (1.4.2)
rvm (1.11.3.8)
test-unit (2.0.0.0)

而且我可以看到 jekyll 不在那里。我做错了什么?还有另一种方法可以确保在 ubuntu 上正确安装了 jekyll 吗?

编辑:

当重新安装 jekyll 时,我现在得到这个新错误:

root@jackrabbit:~# gem install jekyll
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.

/usr/local/rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.0.0-p353/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.0.0-p353/gems/fast-stemmer-1.0.2/ext/gem_make.out

这可能有助于理解问题。

最佳答案

Jekyll 在 ubuntu ruby​​ 1.9.3 上工作得很好

# for Ubuntu 12.04
sudo apt-get update
sudo apt-get install ruby1.9.1 ruby1.9.1-dev \
rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 \
build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev

# for Ubuntu 14.04
sudo apt-get update
sudo apt-get install ruby ruby1.9.1-dev ri1.9.1 node-js

然后你只需要安装 Jekyll

sudo gem install bundler
sudo gem install jekyll

关于ruby - jekyll 安装 ubuntu : gem verification,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20181133/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com