1

在运行 Boxen 后

package { 'totalterminal':
  provider => 'brewcask',
  install_options => ['--appdir=/Applications'],
}

指令,我的系统 Ruby 无法加载库,包括 Set 等内置函数,渲染命令如ruby, irb,bundlegem,完全无法使用,Boxen 无法运行:

mba2:~ nrser$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin

mba2:~ nrser$ which ruby
/usr/bin/ruby

mba2:~ nrser$ ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]

mba2:~ nrser$ ruby -e ''
Could not find mini_portile-0.5.3 in any of the sources
Run `bundle install` to install missing gems.

irbgem并且bundle都立即失败并出现相同的错误。

如果我将 RBenv 的东西放回路径中(通过 sourcing /opt/boxen/env.sh),我会遇到更奇怪的失败,Ruby 找不到 Set 模块:

mba2:~ nrser$ echo $PATH
bin:/opt/boxen/rbenv/shims:/opt/boxen/rbenv/bin:/opt/boxen/rbenv/plugins/ruby-build/bin:node_modules/.bin:/opt/boxen/nodenv/shims:/opt/boxen/nodenv/bin:/opt/boxen/bin:/opt/boxen/homebrew/bin:/opt/boxen/homebrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin

mba2:~ nrser$ which ruby
/opt/boxen/rbenv/shims/ruby

mba2:~ nrser$ ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]

mba2:~ nrser$ ruby -e ''
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- set (LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/index.rb:1:in `<top (required)>'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/source/rubygems.rb:168:in `fetch_specs'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/source/rubygems.rb:66:in `specs'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/lazy_specification.rb:53:in `__materialize__'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/spec_set.rb:88:in `block in materialize'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/spec_set.rb:85:in `map!'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/spec_set.rb:85:in `materialize'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/definition.rb:133:in `specs'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/definition.rb:178:in `specs_for'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/definition.rb:167:in `requested_specs'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/environment.rb:18:in `requested_specs'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/runtime.rb:13:in `setup'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler.rb:119:in `setup'
    from /Library/Ruby/Gems/2.0.0/gems/bundler-1.5.3/lib/bundler/setup.rb:7:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'

这是发生这种情况的第二个盒子,尽管两个盒子都使用非常相似的清单。两者都在 OSX 10.9.3 上。

我的猜测是,这与 TotalTerminal 安装程序在安装过程中重新启动终端应用程序、终止 Boxen/Puppet 有关。

有谁知道出了什么问题,或者我如何修复我的 Ruby?

我不太关心通过 Boxen 安装 TotalTerminal,但没有 Ruby 对我来说基本上是一台损坏的机器。

4

0 回答 0