So verwende ich rbenv, um meine Ruby-Version (für das spezifische Projekt, ich arbeite an diesem ist 2.1.1). Das Problem ist, dass Bundler diese Änderung nicht erkennen kann. Ich habe sogar versucht, die Version in meinem gemfile zu setzen:Bundler mit rbenv-Version pathfile Ausgabe
source "https://my-proxy-address"
ruby "2.1.1"
gem 'fileutils'
gem 'json'
gem 'chef-api'
dies jedoch bewirkt dann, dass die genaue Fehlermeldung als here am Ende des Tutorials gesehen:
[email protected]:~/Desktop/working-bundler-env$ rbenv version
2.1.1 (set by /Users/username/.rbenv/version)
[email protected]:~/Desktop/working-bundler-env$ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin15.0]
[email protected]:~/Desktop/working-bundler-env$ bundle install
Your Ruby version is 2.0.0, but your Gemfile specified 2.1.1
The tutorial hat die Lösung für das Problem (bearbeiten Sie eine Pfaddatei), aber sie sagen nicht, welche Datei geändert werden soll. Welche Datei ändere ich? So bemerkt
$ rbenv
rbenv 1.0.0
Usage: rbenv <command> [<args>]
Some useful rbenv commands are:
commands List all available rbenv commands
local Set or show the local application-specific Ruby version
global Set or show the global Ruby version
shell Set or show the shell-specific Ruby version
install Install a Ruby version using ruby-build
uninstall Uninstall a specific Ruby version
rehash Rehash rbenv shims (run this after installing executables)
version Show the current Ruby version and its origin
versions List all Ruby versions available to rbenv
which Display the full path to an executable
whence List all Ruby versions that contain the given executable
See `rbenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/rbenv/rbenv#readme
$ which bundle
/usr/local/bin/bundle
Haben Sie 'rbenv rehash' probiert? – ole
Ich habe es versucht, keine Änderung –
Kannst du deinen $ PATH Variablenwert ('echo $ PATH') und auch die Ausgabe des' rbenv' Befehls zeigen? – ole