I am having a really strange problem with my current environment.
I am using rbenv, and I have my global and local version of ruby set to ruby 1.9.3-p448
I can even run:
$ ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.3.0]
My bundle works just fine, but as soon as I run:
bundle exec rails server
I get:
env: ruby1.9.1: No such file or directory
I know this is a project specific problem, because I can boot up other rails servers just fine. I am guessing this implies that my project is somehow trying to link my ruby 1.9.3 with ruby1.9.1
Does anyone have any debugging ideas? I feel like I have tried everything. =/
您可能在Gemfile中有一个ruby
声明,或者在项目中有一个.ruby-version
或.rbenv-version
文件,并指定了您所没有的Ruby。
Just to make sure you have it in your current ruby environment, do this:
gem install bundler
rbenv rehash
bundle install # optionally, include --binstubs
bundle exec rails server
As it turns out, there was a file in the project, .bundle/config, that said:
BUNDLE_PATH: vendor/bundle
I took a look in vender/bundle, and sure enough there were two directories, 1.8.7 and 1.9.1
I'm sure to get my project working with 1.9.3, i would either have to create a new directory there, or remove the bundle path from my .bundle config.
To resolve this, I'm just going to get 1.9.1 installed. O_o
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.