Reputation: 4496
I'm working in kali-linux (a linux distro witch is the continuation of Back-Track, based in Ubuntu, just that now is based on Debian wheezy) for some penetration testing. Everything was working just fine, until I decided to update my systems tools. Now whenever I try to run a tool based on ruby, it trows me:
Could not find gem 'ruby-progressbar (>= 1.1.0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
I proceed to run bundle install
but then it comes with Bundler::GemfileNotFound
error.
Kali use by default ruby, for using gems. The software don't 'require' any other package but ruby seems not-fully-configured/installed for the problem at hand.
$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [i486-linux]
$ rvm
bash: rvm: command not found
$ rbenv
bash: rbenv: command not found
Upvotes: 7
Views: 33815
Reputation: 8222
I faced the same problem when I was trying to bundle install
without realizing that I was not in the project directory. Make sure you're in the current project directory.
Upvotes: 20
Reputation: 1822
Try this:
sudo ln -s /var/lib/gems/1.8/bin/bundle /bin/bundle
sudo ln -s /var/lib/gems/1.8/bin/bundler /bin/bundler
Worked for me in debian.
Upvotes: 0
Reputation: 4496
The problem was that for some weird motive Ruby didn't detected that bundler
was installed, although the package manager says so.
$ apt-cache policy bundler
bundler:
Installed: 1.3.5-2
Candidate: 1.3.5-2
$ bundle --version
Bundler::GemfileNotFound
I simply run gem install bundler
then bundler install
as root in the tool root path and everything works as charm.
Upvotes: 2
Reputation: 7225
to avoid this error you should be at the root of your application and create GemFile and specify all gems needed in there, and run bundle install
Upvotes: 3
Reputation: 2194
Do you use rvm
or rbenv
? If so, make sure you are using a particular ruby version.
For rvm, rvm list
and look for an indication next to your ruby version. If the correct one is not listed, run rvm install x.y.z
. If the correct one is not selected, run rvm use x.y.z
If you want to segregate your gems for a given project, create a gemset
. Otherwise, you should be good to go.
Run gem install bundler
. You should not have to do this as sudo. This will install bundler in either the Default rvm gemset, or the selected gemset.
Bundler should now be available and can be run using bundle
. This is the same as bundle install
.
Upvotes: 0