0

I have a rails project in the myapp folder.

# in my_app folder
$ gem -v
...
ruby/2.1.0/rubygems/resolver.rb:406:in `resolve_for_zero': Unable to resolve dependency: 'rails (= 4.1.5, = 4.1.5)' requires 'bundler (< 2.0, >= 1.3.0)' (Gem::UnsatisfiableDependencyError)
...
$ sudo gem -v
Password:
2.4.2

# revoke sudo privileges
$ sudo -k 
$ cd
# in home directory now 
$ gem -v
2.4.2

The Gemfile of my rails project is here and the Gemfile.lock is here. I realize this has something to do with the Gemfile, but have no idea how to fix it.

There is a fix for a similar, but worse issue #886 in rubygems 2.4.2 with this commit . I have upgraded to rubygems 2.4.2 (I had to use sudo gem update --system as gem update --system gave the same error at the time), but the current issue still persists.

Anand
  • 3,690
  • 4
  • 33
  • 64

1 Answers1

0

I had previously fixed a closely related rubygems problem by setting export RUBYGEMS_GEMDEPS=- in my .bash_profile, which was causing this error. that issue has since been fixed with an update, and this bash setting was causing the current problem described above. Removing this line from .bash_profile fixed the problem.

Anand
  • 3,690
  • 4
  • 33
  • 64