0

I have a rails project that I run inside a vm and mount the project directory through nfs. I also have a copy of the project checked out locally.

If I run rubocop on the local version of the project, everything works correctly. However if I run rubocop in the nfs mounted version i get

Could not find proper version of rubocop (0.39.0) in any of the sources
Run `bundle install` to install missing gems.

If I run bundle install from the remote directory I get

Attempting to write to `/home/deploy/ruby/2.1.0` is unsupported by your OS.

However which ruby tells me ruby is located at

/Users/user/.rvm/rubies/ruby-2.1.6/bin/ruby

So, why is it looking for gems in /home/deploy/ruby/2.1.0 when my ruby (and rubocop for that matter) is in a totally different place?

Chris Drappier
  • 5,280
  • 10
  • 40
  • 64
  • Properbly a wrong version of rubocop or wrong language version of generated binary files? – Reporter Oct 12 '16 at 14:27
  • what generated binary files? – Chris Drappier Oct 12 '16 at 14:36
  • Ok, this application doesn't generates binary files. My fault. And though, the error message says that there is a version conflict. – Reporter Oct 12 '16 at 14:39
  • I can't run bundle install from the nfs version either, it says `Attempting to write to '/home/deploy/ruby/2.1.0' is unsupported by your OS.` `/home/deploy/ruby...` is the path to ruby on the vm. I'm not sure why it's trying to write there instead of using the rvm gemset that i'm currently on. `/Users/user/.rvm/rubies/ruby-2.1.6/bin/ruby` is what i get from `which ruby` in the same directory – Chris Drappier Oct 12 '16 at 15:38
  • Are you running RuboCop through Bundler? I.e. `bundle exec rubocop`? – Drenmi Oct 13 '16 at 11:43
  • either way, with `bundle exec` or not it gives the same error – Chris Drappier Oct 13 '16 at 15:31

0 Answers0