1

I am migrating my project over to a new machine and I am having trouble running bundle install on the machine I am trying to use. When I run:

bundle install

I get this error:

Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/home/zach/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir': Permission denied - /home/zach/HandCoOp/project/HandCo-op/vendor/bundle/ruby/2.0.0 (Errno::EACCES)
    from /home/zach/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir'
    from /home/zach/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p'
    from /home/zach/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
    from /home/zach/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
    from /home/zach/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/fileutils.rb:203:in `each'
    from /home/zach/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler.rb:294:in `mkdir_p'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler/installer.rb:325:in `create_bundle_path'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler/installer.rb:51:in `run'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler/installer.rb:15:in `install'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler/cli/install.rb:78:in `run'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler/cli.rb:145:in `install'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler/vendor/thor/command.rb:27:in `run'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler/vendor/thor.rb:363:in `dispatch'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler/vendor/thor/base.rb:440:in `start'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler/cli.rb:9:in `start'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/bin/bundle:20:in `block in <top (required)>'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/gems/bundler-1.6.5/bin/bundle:18:in `<top (required)>'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/bin/bundle:23:in `load'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/bin/bundle:23:in `<main>'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/bin/ruby_executable_hooks:15:in `eval'
    from /home/zach/.rvm/gems/ruby-2.0.0-p451@global/bin/ruby_executable_hooks:15:in `<main>'

I have ran gem install bundler and it successfully ran and I have made sure my version of ruby is the same as the version the project was built in I am running out of ideas and am lost. Thank you anyone who knows what is going wrong and for taking the time to help me.

output of ls -l:
total 20
drwxr-xr-x  2 root root 4096 Jul 24 17:52 bin
drwxr-xr-x  2 root root 4096 Jul 24 17:53 cache
drwxr-xr-x  2 root root 4096 Jul 24 17:51 doc
drwxr-xr-x 49 root root 4096 Jul 24 17:53 gems
drwxr-xr-x  2 root root 4096 Jul 24 17:53 specifications

cd .. ls -l:

total 4
drwxrwxr-x 7 root root 4096 Jul 24 17:51 1.9.1

hope this helps!=D

  • BTW, I did go to the link recommended in the error and I tried everything they suggested but nothing solved this issue. – ZachyBear Jul 28 '14 at 19:22
0

Running these commands in a terminal should fix it.

rm -rf ~/.bundle/ ~/.gem/
rm -rf $GEM_HOME/bundler/ $GEM_HOME/cache/bundler/
rm -rf .bundle/
rm -rf vendor/cache/
rm -rf Gemfile.lock
bundle install
  • 2.0.0 is not a dir, I will try and find which dir I have and I ran with sudo but nothing seemed to change after. – ZachyBear Jul 28 '14 at 19:36
  • I have 1.9.1, is that an issue? – ZachyBear Jul 28 '14 at 19:37
  • Could cause the error, still looks like a simple premission error when creating a directory to me. – Pabi Jul 28 '14 at 19:41
  • well the sudo schmod775 did not fix it=( it is a new machine so I agree with you, I just don't know how to fix it. – ZachyBear Jul 28 '14 at 19:44
  • Can you edit your post with the output of ls -l in the /home/zach/HandCoOp/project/HandCo-op/vendor/bundle/ruby directory? – Pabi Jul 28 '14 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.