Question

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. =/

Was it helpful?

Solution 3

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

OTHER TIPS

You likely have a ruby declaration in your Gemfile, or a .ruby-version or .rbenv-version file in the project, specifying the Ruby you don't have.

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top