I am setting up a new system. I'm using rbenv instead of rvm because rvm changes the definition of 'cd' and that's just evil.
I've got the required version of ruby and rails (I think) installed, but bundler is causing problems:
turlingdrome$ gem install bundler
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /Users/brianp/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bundler-2.0.1/CHANGELOG.md
turlingdrome$ sudo gem install bundler
/usr/local/Cellar/rbenv/1.1.2/rbenv.d/exec/gem-rehash/rubygems_plugin.rb:6: warning: Insecure world writable dir /Users/brianp/work in PATH, mode 040777
Successfully installed bundler-2.0.1
Parsing documentation for bundler-2.0.1
Done installing documentation for bundler after 3 seconds
1 gem installed
turlingdrome$ sudo gem uninstall bundler
Gem 'bundler' is not installed
turlingdrome$ bundler install
Traceback (most recent call last):
2: from /Users/brianp/.rbenv/versions/2.5.3/bin/bundler:23:in `<main>'
1: from /Users/brianp/.rbenv/versions/2.5.3/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/Users/brianp/.rbenv/versions/2.5.3/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundler (Gem::GemNotFoundException)
So, I tried using sudo once, and now I think that the permissions are super user... so I'm using sudo. no big deal.
Installing appears to work.
When I try to uninstall, it says it's not installed.
When I try to run it, it finds an executable, but then says it can't find an executable.
I'm using ruby 2.5.3 and rails (I think) 5.2.3.
Rails crashes with:
turlingdrome$ rails -v
/Users/brianp/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/app_loader.rb:53: warning: Insecure world writable dir /Users/brianp/work in PATH, mode 040777
Traceback (most recent call last):
4: from bin/rails:3:in `<main>'
3: from bin/rails:3:in `require_relative'
2: from /Users/brianp/work/online-reporting/config/boot.rb:6:in `<top (required)>'
1: from /Users/brianp/.rbenv/versions/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/Users/brianp/.rbenv/versions/2.5.3/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- bundler/setup (LoadError)
which I assume is the same issue.
In case this matters, I'm on a mac.