J'essaie d'installer mon projet Rails 5 sur Debian. Exécution bundle install
avec ou sans entraîne une erreur se plaindre de ne pas avoir la version appropriée de Ruby, même si lorsque je cours ruby -v
après, vous pouvez voir la version est 2.4. Comment puis-je pointer bundle install
vers la bonne version?Comment puis-je dire à bundle install d'utiliser la version de Ruby sur mon PATH?
$ sudo bundle install
[sudo] password for myuser:
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Your Gemfile lists the gem jquery-rails (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Using rake 12.0.0
Using concurrent-ruby 1.0.5
Using i18n 0.8.6
Using minitest 5.10.3
Using thread_safe 0.3.6
Using tzinfo 1.2.3
Gem::InstallError: activesupport requires Ruby version >= 2.2.2.
An error occurred while installing activesupport (5.0.4), and Bundler cannot continue.
Make sure that `gem install activesupport -v '5.0.4'` succeeds before bundling.
$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [armv6l-linux-eabihf]
Courir sans sudo
:
$ bundle install
Your Gemfile lists the gem jquery-rails (>= 0) more than once.
You should probably keep only one of them.
While it's not a problem now, it could cause errors if you change the version of just one of them later.
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Using rake 12.0.0
Using concurrent-ruby 1.0.5
Using i18n 0.8.6
Using minitest 5.10.3
Using thread_safe 0.3.6
Using tzinfo 1.2.3
Gem::InstallError: activesupport requires Ruby version >= 2.2.2.
An error occurred while installing activesupport (5.0.4), and Bundler cannot continue.
Make sure that `gem install activesupport -v '5.0.4'` succeeds before bundling.
$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [armv6l-linux-eabihf]
K, alors j'ai couru "petit bijou whereis" et obtenu « petit bijou:/usr/bin/gem /usr/bin/gem2.1/usr/local/bin/gem/usr/share/man/man1 /gem.1.gz ". Ne ressemble pas à la version la plus récente de gem. Comment je reçois ça? – Dave
@Dave Comment avez-vous installé ruby2.4 sur votre système? A-t-il été compilé à partir de la source? –
Pour Ubuntu, j'utilise [ce référentiel] (https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng), et le paquet 'rubygems-integration' (v 1.10) est également installé et configuré pour fournir /usr/lib/gemX.X lors de l'installation de Ruby. –