I'm using rbenv
and rbenv-gemset
to manage the gems for a middleman project.
Even though I've run the rbenv rehash
command, the shim for middleman does not exist:
→ middleman git:(master) × rbenv which middleman
rbenv: middleman: command not found
You can see here that I do have the middleman gem installed though:
→ 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)
And here it is in my rbenv-gemset
directory:
→ 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
And here you can also see there is a middleman
command in the rbenv-gemsets
directory:
→ 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
Yet running rbenv rehash
does not generate the middleman
shim (among others) :
→ 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
Here is my gem environment:
→ 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/
What could be going wrong? Is this an issue with rbenv
or rbenv-gemset
?
funnily enough, somebody reported the exact same problem just a few days ago - and with middleman
too. The problem has now been fixed (see https://github.com/jf/rbenv-gemset/issues/48). The problem in this case was rbenv-gemset
. Sorry about that!
You can upgrade to the latest version of rbenv-gemset
to get the fix (are you using git? or homebrew?)
EDIT @asgeo1, you might want to "accept" that answer, so that others who come by will be helped as well. Thanks.