0
我試圖用廚師以下(Centos的VM)的問題:廚師RVM食譜 - 與訪問安裝寶石
- 安裝Ruby 1.9.3
- 創建一個寶石(「廚師測試」 )這是提供給任何人
- 上的「廚師測試」安裝兩種寶石(rubocop和foodcritic)寶石
從包裝食譜中安裝RVM。
這裏是我的食譜的部分,它覆蓋RVM食譜和理論上應該可以在上面做:
node.override['rvm']['default_ruby'] = '[email protected]'
node.override[:rvm][:rubies] = [ '[email protected]' ]
node.override['rvm']['group_users'] = [ 'teamcity' ]
node.override['rvm']['gems'] = {
'[email protected]' => [
{ 'name' => 'rubocop',
'version' => '0.19.1'
},
{ 'name' => 'foodcritic'}
]
}
include_recipe 'rvm::system'
廚師匯聚完成時沒有錯誤,但是當我登錄爲「TeamCity的」用戶和執行其中一個寶石我得到以下內容:
[[email protected] ~]$ rubocop
/usr/local/rvm/rubies/ruby-1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/
kernel_require.rb:135:in `require': cannot load such file
-- ruby-progressbar (LoadError)
from /usr/local/rvm/rubies/ruby-1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from /usr/local/rvm/rubies/ruby-1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:144:in `require'
from /usr/local/rvm/gems/[email protected]/gems/rubocop-0.19.1/lib/rubocop/formatter/fuubar_style_formatter.rb:3:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/gems/[email protected]/gems/rubocop-0.19.1/lib/rubocop.rb:224:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p545/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/gems/[email protected]/gems/rubocop-0.19.1/bin/rubocop:7:in `<top (required)>'
from /usr/local/rvm/gems/[email protected]/bin/rubocop:23:in `load'
from /usr/local/rvm/gems/[email protected]/bin/rubocop:23:in `<main>'
from /usr/local/rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `eval'
from /usr/local/rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `<main>'
-- ruby-progressbar (LoadError)
我在這裏錯過了什麼?用戶正確添加到rvm組,並且當我以用戶身份登錄時,默認加載正確的gemset。
捆綁更新後,我遇到了這個問題。所以我查看了鎖文件中更新的內容,並發現它是ruby-progressbar。 –
有道理。再次感謝。 – keftes