1

Refer the screenshot attached. I couldn't create Rails application in local. posted similar query before https://stackoverflow.com/questions/44510632/bundle-install-unable-to-execute-usr-local-bin-bundle-no-such-file-or-directo

Still didn't find any solutions that were helpful enter image description here

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java. There was an error while trying to write to /home/vishnu/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions. It is likely that you need to grant write permissions for that path. run bundle exec spring binstub --all bundler: command not found: spring Install missing gem executables with bundle install vishnu@vishnu-Inspiron-3543:~$ bundle install Could not locate Gemfile vishnu@vishnu-Inspiron-3543:~$ bundle exec spring binstub --all Could not locate Gemfile or .bundle/ directory

3
  • Please post text-that's text, an image is difficult to read. Commented Sep 17, 2017 at 0:31
  • Please post the text in red. Image is not clear Commented Sep 17, 2017 at 0:32
  • Sorry for the inconvenience Commented Sep 17, 2017 at 1:40

2 Answers 2

1

There are multiple errors here. Let's explore them one by one.

  1. There was an error while trying to write to /home/vishnu/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions. It is likely that you need to grant write permissions for that path. run bundle exec spring binstub --all bundler: command not found: spring Install missing gem executables with bundle install

As the error clearly says, you need to give write permission to /home/vishnu/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions directory. Can you check what are the permission for /home/vishnu/ directory? You can check by issuing command ls -l /home/vishnu

  1. vishnu@vishnu-Inspiron-3543:~$ bundle install Could not locate Gemfile

You need to navigate to project directory created by Rails and then issue the bundle command. Make sure Gemfile is present in that directory before issuing bundle install.

  1. vishnu@vishnu-Inspiron-3543:~$ bundle exec spring binstub --all Could not locate Gemfile or .bundle/ directory

Same as above.

Follow the above troubleshooting steps and let us know if this resolves the issue or not.

Sign up to request clarification or add additional context in comments.

Comments

1
sudo chown $(whoami):$(whoami) ~/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions 

This fixed this problem for me.

EDIT: The whoami command in most unix-style operating systems prints the username of the currently logged-in user.

The error you received detailed:

There was an error while trying to write to /home/vishnu/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions. It is likely that you need to grant write permissions for that path.

In order to grant write permission for that path, you can change the owner to your user. chown changes the user and/or group ownership of each given file.

As someone said in the comments, the pasted command will change the owner AND group of the given files.

Note: You may not need to update the group. Just changing the owner to your user might be enough, but that is how i got this error resolved.

The argument supplied before the colon defines which user to assign as the owner. The argument supplied after the colon denotes the group.

In your case, the owner is set to vivek (assuming that is the currently logged in user).

Hope this help!

2 Comments

Please note, this changes the owner and group of the passed directory to the output of the whoami command. Be careful blindly copying and be sure to run this on a directory you really want to "claim" yours.
Explain your answer. Nobody needs code without explanation.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.