rvm/ruby: el empaquetador no funciona al intentar crear un esqueleto de gema

I updated my ubuntu version from 12.04 to 13.04 and so had to reinstall everything... Most things are now working... However, 'bundler' is not.

i.e. when running the following to create a new gem skeleton:

bundle gem np_search

me da el siguiente error:

when under rvm ruby v. 2.0.0 (same error seen with 1.9.3)

Unfortunately, a fatal error has occurred. Please see the Bundler troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/home/ismail/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/cli.rb:689:in ``': No such file or directory - git (Errno::ENOENT)
from /home/ismail/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/cli.rb:689:in `gem'
from /home/ismail/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
from /home/ismail/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
from /home/ismail/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
from /home/ismail/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
from /home/ismail/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>'
from /home/ismail/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
from /home/ismail/.rvm/gems/ruby-2.0.0-p247@global/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>'
from /home/ismail/.rvm/gems/ruby-2.0.0-p247@global/bin/bundle:23:in `load'
from /home/ismail/.rvm/gems/ruby-2.0.0-p247@global/bin/bundle:23:in `<main>'

when running under the system ruby (i.e. without rvm) ruby version 2.0.0

-bash: /usr/local/bin/bundle: /usr/bin/ruby1.8: bad interpreter: No such file or directory

I have carried out all the steps in the link in the first error message but still the problem remained. Also, had a look on google and stackoverflow but couldn't find anything that fixed the problem...

This is what I get when typing "bundle env"

when in rvm:

Bundler 1.3.5
Ruby 2.0.0 (2013-06-27 patchlevel 247) [x86_64-linux]
Rubygems 2.0.7
rvm 1.22.5 (stable)
GEM_HOME /home/ismail/.rvm/gems/ruby-2.0.0-p247
GEM_PATH /home/ismail/.rvm/gems/ruby-2.0.0-p247:/home/ismail/.rvm/gems/ruby-2.0.0-p247@global

Gemfile
<No Gemfile found>

Gemfile.lock
<No Gemfile.lock found>

when using system ruby 2.0.0, 'bundle env' just gives me

-bash: /usr/local/bin/bundle: /usr/bin/ruby1.8: bad interpreter: No such file or directory

I did try to export the ruby path to the .bashrc (something I read online) by typing this...

sudo ln -s /usr/bin/ruby /usr/local/bin/ruby

Pero no hizo ninguna diferencia.

Many thanks for all your help...

preguntado el 10 de septiembre de 13 a las 00:09

1 Respuestas

this happens because bundler requires git for this command to be installed - from the mentioned code line:

git_user_name = `git config user.name`.chomp

instalar git and then it should work just fine ... at least for this part.

Respondido el 10 de Septiembre de 13 a las 01:09

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.