LoginSignup
9
4

More than 1 year has passed since last update.

Rails7でdevise_token_authをインストールする

Posted at

遭遇したエラー

$ bundle

Fetchings gem metadata from https://rubygems.org/...........
Resolving dependencies....
Bundler could not finde compatible versions from gem "rails":
    In Gemfile:
        rails (~> 7.0.1)

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

rubygemsに上がっているdevise_token_authがRails7をサポートしていないためインストールができない

解消法

Gemfileに以下のようにdevise_token_authを追加する

gem 'devise_token_auth', '>= 1.2.0', git: "https://github.com/lynndylanhurley/devise_token_auth"

githubに上がっているdevise_token_authはRails7をサポートしているので、インストール出来る

9
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
4