sstephenson/rbenv — Issue #152: Could not find rails (>= 0) amongst []...
Author: kenips
Created: 2011-11-24 19:38:25+00:00
State: open

I'm not sure whether this is a rbenv-gemset bug or rbenv bug, so I'm posting it here first. So the error I have is straight-forward:

```
/Users/Ken/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rails (>= 0) amongst [] (Gem::LoadError)
from /Users/Ken/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/Ken/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/rubygems.rb:1210:in `gem'
from /Users/Ken/.rbenv/versions/1.9.2-p290/gemsets/3010/bin/rails:18:in `

'
```

As you can see from the trace it jumps straight from 1.9.2-p290 `rails` to 1.9.3-p0 `rubygems.rb`. For now I have to use `bundle exec rails` to prevent it from doing this.

I have rbenv global at 1.9.3-p0, and rbenv local at 1.9.2-p290. rbenv is at homebrew's latest version.

Anyone know why this is happening? Thanks!

```
~: rbenv which rails
/Users/Ken/.rbenv/versions/1.9.2-p290/gemsets/3010/bin/rails

~: rbenv which gem
/Users/Ken/.rbenv/versions/1.9.2-p290/bin/gem

~: gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.11
- RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [x86_64-darwin11.2.0]
- INSTALLATION DIRECTORY: /Users/Ken/.rbenv/versions/1.9.2-p290/gemsets/3010
- RUBY EXECUTABLE: /Users/Ken/.rbenv/versions/1.9.2-p290/bin/ruby
- EXECUTABLE DIRECTORY: /Users/Ken/.rbenv/versions/1.9.2-p290/gemsets/3010/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-11
- GEM PATHS:
- /Users/Ken/.rbenv/versions/1.9.2-p290/gemsets/3010
(...skipped)
```