我正在使用ruby 2.1.10开展项目。它应该使用rails 4.0.13。
我正在使用rbenv。
我相信,我已经安装了所有东西。我为项目运行了bundle install。最终我让它运行。然而,现在我得到了:
turlingdrome$ rails
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
turlingdrome$ gem install rails -v 4.0.13
Successfully installed rails-4.0.13
Parsing documentation for rails-4.0.13
Done installing documentation for rails after 1 seconds
1 gem installed
turlingdrome$ which rails
/Users/brianp/.rbenv/shims/rails
turlingdrome$ rails -v
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
turlingdrome$ ruby -v
ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-darwin16.0]
如果重要,我会在运行10.12.6的Mac上运行
来自评论的ETA:
turlingdrome$ bundle exec rails -v
Rails 4.0.13
所以,bundle exec让我运行rails。 rbenv exec rails似乎也有用。
所以,问题似乎在垫片中!
答案 0 :(得分:1)
重新垫片:
rbenv rehash
现在,您应该只能在不rails
或bundle exec
的情况下运行rbenv exec
。