2014-07-07 107 views
0

試圖安裝gem rubyracergem execjs,原因我不記得了。jekyll安裝rubyracer/execjs gem的問題

可能是因爲我試圖部署一個在服務器上顯示主要問題的jekyll站點。

因此,試圖運行jekyll --server

得到這個錯誤:

/usr/local/rvm/gems/ruby-2.1.2/gems/execjs-2.2.1/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) 
from /usr/local/rvm/gems/ruby-2.1.2/gems/execjs-2.2.1/lib/execjs.rb:5:in `<module:ExecJS>' 
from /usr/local/rvm/gems/ruby-2.1.2/gems/execjs-2.2.1/lib/execjs.rb:4:in `<top (required)>' 
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /usr/local/rvm/gems/ruby-2.1.2/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>' 
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /usr/local/rvm/gems/ruby-2.1.2/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>' 
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /usr/local/rvm/gems/ruby-2.1.2/gems/jekyll-coffeescript-1.0.0/lib/jekyll-coffeescript.rb:2:in `<top (required)>' 
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /usr/local/rvm/gems/ruby-2.1.2/gems/jekyll-2.1.0/lib/jekyll.rb:75:in `<top (required)>' 
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
from /usr/local/rvm/gems/ruby-2.1.2/gems/jekyll-2.1.0/bin/jekyll:6:in `<top (required)>' 
from /usr/local/rvm/gems/ruby-2.1.2/bin/jekyll:23:in `load' 
from /usr/local/rvm/gems/ruby-2.1.2/bin/jekyll:23:in `<main>' 
from /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval' 
from /usr/local/rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>' 

所以,因此的rubyracerexecjs

安裝嘗試這是我所得到的,當我嘗試安裝它們(消息對於兩者是相同的):

/usr/local/rvm/rubies/ruby-2.1.2/bin/gem:8:in `require': no such file to load -- rubygems (LoadError) 
from /usr/local/rvm/rubies/ruby-2.1.2/bin/gem:8 

環境是linux服務器。不是我的筆記本。

其他信息

which jekyll得到這個:/usr/local/rvm/gems/ruby-2.1.2/bin/jekyll

echo $PATH得到這個:

/usr/local/rvm/gems/ruby-2.1.2/bin:/usr/local/rvm/gems/[email protected]/bin:/usr/local/rvm/rubies/ruby-2.1.2/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/rvm/bin:/home/coffee/bin 

ruby -v得到這個:ruby 2.1.2p95 (2014-05-08 revision 45877) [i686-linux]

which ruby得到日是:usr/local/rvm/rubies/ruby-2.1.2/bin/ruby

回答

0

jekyll --server已棄用,您可以使用jekyll serve

我想你的RVM出了問題。嘗試使用rvm implode將其刪除並重新安裝。