Reputation: 129
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
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
Upvotes: 1
Views: 1603
Reputation: 11
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!
Upvotes: 1
Reputation: 869
There are multiple errors here. Let's explore them one by one.
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
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
.
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.
Upvotes: 1