Rails 4 will not run (under rbenv); pathname problem with app_rails_loader

This is an OS X Homebrew install, with rbenv root in /usr/local/var/rbenv; Ruby 2.0.0, and Rails 4.0.0. ‘gem install rails’ went without complaint. Then I tried to run ‘rails new hypothetical_app’. That, and all calls to the rails app, show that app_rails_loader is finding a directory bin/rails where it expects to find a file bin/rails:

/usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/app_rails_loader.rb:34:inread': Is a directory - bin/rails (Errno::EISDIR) from /usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/app_rails_loader.rb:34:in ``from /usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/app_rails_loader.rb:34:inblock in exec_app_rails’
from /usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/app_rails_loader.rb:32:inloop' from /usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/app_rails_loader.rb:32:in ``from /usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/app_rails_loader.rb:32:inexec_app_rails’
from /usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0/lib/rails/cli.rb:6:in<top (required)>' from /usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in ``from /usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:inrequire’
from /usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in require' from /usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0/bin/rails:9:in ``from /usr/local/var/rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/railties-4.0.0/bin/rails:9:in
from /usr/local/var/rbenv/versions/2.0.0-p195/bin/rails:23:in load' from /usr/local/var/rbenv/versions/2.0.0-p195/bin/rails:23:in ``from /usr/local/var/rbenv/versions/2.0.0-p195/bin/rails:23:in
Aside from not setting my rbenv root to ~/.rbenv, I can’t think of any departures I have made from completely standard installation of everything.

So, I just did this on a brand new machine, but using rvm instead of rbenv. No problems on this end. I’d be looking at the rbenv configuration.