0

I'm attempting to install devise_token_auth. The instructions say to add gem 'devise_token_auth' to my Gemfile, then run bundle install. I created a brand new API only Rails app, follow the instructions, and get the following:

Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    rails (~> 6.1.1) x86_64-darwin-20

    devise_token_auth x86_64-darwin-20 was resolved to 0.1.21.alpha2, which depends on
      rails (~> 4.1.4)

What is x86_64-darwin-20? That's not in the Gemfile, but I'm working on MacOS. What's going on?

izaguirrejoe
  • 117
  • 8
  • 1
    That looks like an old version of `devise_token_auth`. That version was realeased in 2014 so it is quite old. I think 1.1.4 is the newest version and likely won't have any issues, if you specify that in the Gemfile, with your version of Rails. https://rubygems.org/gems/devise_token_auth/versions . That other bit about the platform info `x86_64-darwin-20` might be answered here https://stackoverflow.com/questions/50765393/running-bundle-or-rspec-adds-line-to-gemfile-lock – Rockwell Rice Jan 23 '21 at 23:00
  • That seemed to do it. Seems like devise_token_auth v1.1.4 needs rails >= 4.2.0, < 6.1, so I just specified gem 'rails', '6.0'. I wish I could give your comment the answer, is there a way to do so? I'm new to this. – izaguirrejoe Jan 23 '21 at 23:10
  • No there isn't. It's cool, glad you got it solved. – Rockwell Rice Jan 23 '21 at 23:12

1 Answers1

0

Credit to Rockwell Rice: https://rubygems.org/gems/devise_token_auth/versions/1.1.4 shows you the dependencies.

devise_token_auth depends on rails >= 4.2.0, < 6.1. So I just recreated a new rails app with version 6.0.

izaguirrejoe
  • 117
  • 8
  • But thats not a solution. Is there any major difference rolled out in rails 6.1.1 which makes device auth token gem stuck at current version? Has any one patched it? I wish device_aoth_token have a patch to work with rails 6.1.1 – Krishna Prasad Varma Feb 04 '21 at 11:24