-1

I am attempting to get a project running om my Mac with High Sierra computer. After using rbenv and setting the correct version it cd into the project and run bundle install. It tells me the following files may not be writeable and tells me I have the wrong version. Only thing is what it's telling me are the pre brought items from my mac machine.

I attempted to uninstall ruby and reinstall it. I made sure my ~/.bash_profile had the eval "$(rbenv init -)" I even attempted an alternative which another user suggested export PATH="$HOME/.rbenv/shims:$PATH". I made sure rbenv used the correct version globally and locally. Using sudo is dangerous although I did that too like an idiot, sure enough, my computer warned me. I ran ruby --version the output was ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18] When I check with the rbenv-doctor

curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-doctor | bash

my output tells me everything is dandy.

Checking for `rbenv' in PATH: /usr/local/bin/rbenv
Checking for rbenv shims in PATH: OK
Checking `rbenv install' support: /usr/local/bin/rbenv-install (ruby-build 20190423)
Counting installed Ruby versions: 1 versions
Checking RubyGems settings: OK
Auditing installed plugins: OK 

This is the issues I am having with rbenv currently.

[My-Macbook]:sf-dahlia-web username$ bundle install
Following files may not be writable, so sudo is needed:
  /Library/Ruby/Gems/2.3.0
  /Library/Ruby/Gems/2.3.0/build_info
  /Library/Ruby/Gems/2.3.0/cache
  /Library/Ruby/Gems/2.3.0/doc
  /Library/Ruby/Gems/2.3.0/extensions
  /Library/Ruby/Gems/2.3.0/gems
  /Library/Ruby/Gems/2.3.0/specifications
Your Ruby version is 2.3.7, but your Gemfile specified 2.5.3

It should successfully run and show all the dependencies for the application I pulled.

eookuro
  • 7
  • 3
  • 2
    If you say `ruby --version` in the Terminal and you don't see "ruby2.5.3", you have not configured rbenv properly. You should not be seeing `/Library` at all. – matt Jul 31 '19 at 22:24
  • 1
    As with what matt said, `/Library/Ruby` is the system Ruby that came with the OS. Anything installed by `rbenv` goes into `~/.rbenv` usually. – tadman Jul 31 '19 at 22:28
  • My ruby version comes out just fine`ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18]`. I added that info to the main question. – eookuro Aug 01 '19 at 13:15

1 Answers1

-1

I figured it out just fine. Basically rbenv was installed correctly and the issues was a path during install was incorrect so my machine wasn't able to run bundle install removing every single item in my environment and checking all my paths and reinstalling everything worked fine.

eookuro
  • 7
  • 3
  • That's not as helpful answer. Unclear how it relates to the question or what it even means. Give specifics please. How might someone else encounter this issue, and if they do, what is the correct solution? "issues was a path during install was incorrect" What path during the install of what? What was the wrong path and what is the right path? – matt Aug 01 '19 at 17:18
  • You _might_ be saying that after installing `rbenv` it is also important to install your gems. That's sort of trivially obvious but if that's the answer then at least you should say it. – matt Aug 01 '19 at 17:23