我使用rbenv
和rbenv-gemset
管理中间人项目的宝石。
即使我运行rbenv rehash
命令,中间人的垫片也不存在:
→ middleman git:(master) × rbenv which middleman
rbenv: middleman: command not found
你可以在这里看到我确实安装了中间人宝石:
→ middleman git:(master) × gem list middleman
*** LOCAL GEMS ***
middleman (3.1.5)
middleman-core (3.1.5)
middleman-more (3.1.5)
middleman-sprockets (3.1.4)
这是在我的rbenv-gemset
目录中:
→ middleman git:(master) × ls .gems/gems
middleman-3.1.5
middleman-core-3.1.5
middleman-more-3.1.5
middleman-sprockets-3.1.4
在这里你还可以看到middleman
目录中有一个rbenv-gemsets
命令:
→ middleman git:(master) × ls .gems/bin/
bundle erubis kramdown padrino rails rake2thor ri sass-convert sprockets tilt
compass haml middleman rackup rake rdoc sass scss thor tt
然而,运行rbenv rehash
不会生成middleman
垫片(以及其他):
→ middleman git:(master) × ls ~/.rbenv/shims
bundle dnsimple.rb gem rackup rdoc sass sdoc testrb tt update_rubygems
compass erb httparty rails ri sass-convert sdoc-merge thor unicorn
dnsimple erubis irb rake ruby scss sprockets tilt unicorn_rails
这是我的宝石环境:
→ middleman git:(master) × gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.7
- RUBY VERSION: 1.9.3 (2013-06-27 patchlevel 448) [x86_64-darwin12.4.0]
- INSTALLATION DIRECTORY: /Users/asgeo1/Projects/myproj/middleman/.gems
- RUBY EXECUTABLE: /Users/asgeo1/.rbenv/versions/1.9.3-p448/bin/ruby
- EXECUTABLE DIRECTORY: /Users/asgeo1/Projects/myproj/middleman/.gems/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-12
- GEM PATHS:
- /Users/asgeo1/Projects/myproj/middleman/.gems
- /Users/asgeo1/.rbenv/versions/1.9.3-p448/gemsets/global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
可能出现什么问题?这是rbenv
或rbenv-gemset
的问题吗?
答案 0 :(得分:1)
middleman
也是如此。问题现已得到解决(见https://github.com/jf/rbenv-gemset/issues/48)。这种情况下的问题是rbenv-gemset
。对不起!
您可以升级到最新版本的rbenv-gemset
以获得修复(您使用的是git还是自制软件?)
编辑 @ asgeo1,您可能希望“接受”该答案,以便其他来访的人也会得到帮助。感谢。