paquete: comando no encontrado
Estoy alojando en un vps, ubuntu 10.04, rails 3, ruby y mysql instalados correctamente siguiendo algunos tutoriales. Si corro bundle check
o bundle install
obtengo el error '-bash: bundle: command not found'. Desde gem list --local
veo que ' bundler (1.0.2, 1.0.0)' está instalado.
No se que esta pasando mal...
gem environment
devuelve:
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-04-19 patchlevel 253) [i686-linux]
- INSTALLATION DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /opt/ruby-enterprise-1.8.7-2010.02/bin/ruby
- EXECUTABLE DIRECTORY: /opt/ruby-enterprise-1.8.7-2010.02/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8
- /root/.gem/ruby/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
Y echo $PATH
devuelve:
/opt/myruby/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/bin/gem:/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/:/root/.gem/ruby/1.8
Y which gem
devuelve:
/usr/bin/gem
locate bundle
devuelve:
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/
12 answers
Necesita agregar el directorio ejecutable de ruby gem a su ruta
export PATH=$PATH:/opt/ruby-enterprise-1.8.7-2010.02/bin
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-03-20 13:23:00
Mi problema fue que lo hice:
sudo gem install bundler
Así que había instalado como raíz en lugar de como yo mismo. Así que desinstalé como root, luego instalé como yo mismo:
sudo gem uninstall bundler
gem install bundler
rbenv rehash
(último comando para si está usando rbenv)
Y funcionó. La ruta" correcta " estaba en .bashrc
(u otro perfil de shell), al menos de acuerdo con
$PATH
=> zsh: /Users/myself/.rbenv/shims:/Users/myself/.rbenv/bin: ... etc
Pero esperaba que se instalara para mí, no para root. En mi caso, su lugar de instalación legítimo está en ~/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-06-22 23:33:58
... también para Debian GNU / Linux 6.0:)
export PATH=$PATH:/var/lib/gems/1.8/bin
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-01-18 09:42:35
Hice esto (Ubuntu último en marzo de 2013 [Creo:)]):
sudo gem install bundler
El crédito va a Ray Baxter .
Si necesitas gem, instalé Ruby de esta manera (aunque esto es crónicamente agotador):
mkdir /tmp/ruby && cd /tmp/ruby
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz
tar xfvz ruby-1.9.3-p327.tar.gz
cd ruby-1.9.3-p327
./configure
make
sudo make install
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-05-23 10:31:12
Estoy ejecutando ubuntu 11.10 y el ejecutable del paquete estaba ubicado en:
/var/lib/gems/1.8/bin
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-12-05 09:07:04
Probablemente la ruta a prueba de distribución está agregando esto a su .bashrc or .zshrc, sea cual sea tu shell:
PATH="$(ruby -e 'print Gem.default_dir')/bin:$PATH"
O si ha instalado su gems para todo el usuario, use:
PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-10-24 11:34:08
Mi solución fue asegurarme de seleccionar una versión de Ruby para ese repositorio.
Ejemplo: chruby 2.2.2
o rvm use 2.2.2
λ bundle install
zsh: command not found: bundle
λ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
### Notice the system Ruby version isn't included in chruby
λ chruby
ruby-1.9.3-p551
ruby-2.1.2
ruby-2.2.1
### Select a version via your version manager
λ chruby 1.9.3
### Ensure your version manager properly selects a version (*)
λ chruby
* ruby-1.9.3-p551
ruby-2.1.2
ruby-2.2.1
λ bundle install
Fetching gem metadata from https://rubygems.org/.........
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-08-07 17:15:18
Paso 1: Asegúrese de que está en el espacio de trabajo real path.Por ejemplo, workspace/blog $: Paso 2: Ingrese el comando: gem install bundler. Paso 3: Usted debe estar todo listo para bundle install o bundle update por ahora
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-06-14 14:12:09
Creo que el ejecutable del paquete está encendido:
/opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/bin
y no está en su PATH CAMINO
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2010-10-12 13:01:27
Asegúrese de hacerlo rbenv rehash
al instalar diferentes rubíes
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-06-12 13:05:21
También puede crear un enlace simbólico:
ln -s /opt/ruby-enterprise-1.8.7-2010.02/lib/ruby/gems/1.8/gems/bin/bundle /usr/bin/bundle
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-11-02 14:37:16
Tuve exactamente el mismo problema y pude resolverlo ejecutando
rbenv rehash
Después de eso bundle
funcionó como se esperaba. Al echar un vistazo a la entrada wiki de rbenv, menciona que rehash debe ejecutarse cuando una gema instalada proporciona comandos.
Instala shims para todos los ejecutables Ruby conocidos por rbenv (i. e., ~/.rbenv / versions / / bin / ). Ejecute este comando después de instalar un nuevo versión de Ruby, o instalar una gema que proporcione comando.
Aparentemente esto es una molestia tal que algunas personas han escrito una gema para asegurarse de que nunca tenga que ejecutar rehash
de nuevo.
rbenv-gem-rehash
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-12-16 19:37:15