a-chernykh / railsbox

Fast and easy Ruby on Rails virtual machines
https://railsbox.io
MIT License
320 stars 52 forks source link

Bundler install issue #28

Closed poulping closed 4 years ago

poulping commented 9 years ago

Hello, I am trying to follow the steps to install a new railsbox on my macbook, and get stuck at the following error. I am new to RoR and ansible, any hints on how to debug the situation and solve the issue would be greatly appreciated.

TASK: [ruby | bundle install] ************************************************* 
failed: [wherecani] => {"changed": true, "cmd": ["/bin/bash", "-l", "-c", "bundle install"], "delta": "0:00:00.236763", "end": "2015-08-16 16:36:08.413656", "rc": 10, "start": "2015-08-16 16:36:08.176893", "warnings": []}
stdout: Could not locate Gemfile or .bundle/ directory

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/Users/a_lassignardie/site.retry

wherecani                  : ok=36   changed=6    unreachable=0    failed=1

So it looks like it fails while trying to install a bundle... Thanks !

ferrisoxide commented 9 years ago

Had a similar problem. It might be an issue with the default Vagrantfile. Assuming your app is my_rails_app and the source for the app is in a common folder as your railsbox project, you may have something like this:

 machine.vm.network 'private_network', ip: '192.168.20.50'
 machine.vm.synced_folder '../../', '/my_rails_app'
 machine.vm.synced_folder '../ansible', '/ansible'

It needs to look like this:

 machine.vm.network 'private_network', ip: '192.168.20.50'
 machine.vm.synced_folder '../../my_rails_app', '/my_rails_app'
 machine.vm.synced_folder '../ansible', '/ansible'

I think this is a bug that has recently been introduced, as I don't remember having the problem before. @andreychernih is probably the best person to confirm, but if in doubt vagrant ssh into your box after the provisioning fails and cd into whatever your shared folder should be (the my_rails_app in the example).

If it's pointing to the wrong folder you'll just need to update the Vagrantfile then reload and reprovision the VM.

ferrisoxide commented 9 years ago

Ignore that.. looks like I was incorrect

poulping commented 9 years ago

Hi, sorry for the late reply I was on holidays relaxing away from computers;). So yes, @ferrisoxide , I tried your fix and still have the issue. Not sure how to solve the problem, I just put a much simpler VM for now with Vagrant, but if I can help in any way, let me know.

lacostenycoder commented 8 years ago

I'm having a similar issue. When I do vagrant up I get:

Installing the 'vagrant-bindfs --version '0.3.2'' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

An error occurred while installing nokogiri (1.6.6.4), and Bundler cannot continue.
Make sure that `gem install nokogiri -v '1.6.6.4'` succeeds before bundling.
brandonjjon commented 8 years ago

I have this same exact issue as well.

TASK: [ruby | bundle install] ************************************************* 
failed: [railstest] => {"changed": true, "cmd": ["/bin/bash", "-l", "-c", "bundle install"], "delta": "0:00:00.236763", "end": "2015-08-16 16:36:08.413656", "rc": 10, "start": "2015-08-16 16:36:08.176893", "warnings": []}
stdout: Could not locate Gemfile or .bundle/ directory

FATAL: all hosts have already failed -- aborting

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/Users/brandonjjon/site.retry

railstest                  : ok=36   changed=6    unreachable=0    failed=1
acorncom commented 8 years ago

This is working fine on our end ...

agentargyle commented 8 years ago

This is working fine on our end ...

Funny. That is what Vagrant is supposed to alleviate. I got the same error. I used

gem install bundler

to install bundler but after then running bundle install I got

Could not locate Gemfile or .bundle/ directory

So do I have to set the PATH variable or something next?

agentargyle commented 8 years ago

Even after installing bundler manually I still get the following error when I issue the vagrant provision command:

TASK [ruby : Install bundler] ************************************************** fatal: [myapp]: FAILED! => {"changed": true, "cmd": ["/bin/bash", "-l", "-c", "gem install bundler --no-ri --no-rdoc"], "delta": "0:00:04.712521", "end": "2016-08-27 19:12:31.518530", "failed": true, "rc": 1, "start": "2016-08-27 19:12:26.806009", "stderr": "/home/myapp/profile.d/rvm.sh: line 3: /home/myapp/.rvm/scripts/rvm: No such file or directory\nERROR: While executing gem ... (Gem::FilePermissionError)\n You don't have write permissions into the /var/lib/gems/1.9.1 directory.", "stdout": "", "stdout_lines": [], "warnings": []}

It appears to be still referring to the ruby 1.9.1 despite having installed 2.3.0 and set it as default