Domanda

I'm following along with Michael Hartl's R-o-R tutorial. Having hit a problem, I got the good advice on SO to grab Hartl's reference code from github, which I've done.

However, when following his instructions to get the reference code set up in a tmp directory, I can either rbenv version 2.1.1, in which case I get a conflict with the gem file, or go with Ruby version 2.0.0-p451 as in the gem file, in which case neither bundler nor rails will run. I get the following (for example) -

Dans-MacBook-Air:sample_app_rails_4 dan$ rails

Your Ruby version is 2.1.1, but your Gemfile specified 2.0.0

Dans-MacBook-Air:sample_app_rails_4 dan$ rbenv local 2.0.0-p451
Dans-MacBook-Air:sample_app_rails_4 dan$ rbenv rehash
Dans-MacBook-Air:sample_app_rails_4 dan$ bundler install

rbenv: bundler: command not found

The `bundler' command exists in these Ruby versions:
  2.1.1

Dans-MacBook-Air:sample_app_rails_4 dan$ 

I could just change the ruby version in the gemfile, but I'm trying to track down another bug so I want to replicate the original exactly.

Thanks for reading this - any ideas? When I installed rails etc, I was working with Ruby 2.1.1 - has this caused the problem?

È stato utile?

Soluzione

Each version of ruby has its own gemset. You'll have to install bundler again for each version of Ruby.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top