LoginSignup
0

More than 5 years have passed since last update.

angular_rails_csrfがrails5に対応してないのでローカルインストールする

Posted at

angular_rails_csrfをインストールしようと思ったら激しく怒られました。

Bundler could not find compatible versions for gem "rails":
  In snapshot (Gemfile.lock):
    rails (= 5.0.0.1)

  In Gemfile:
    rails (>= 5.0.0.1, ~> 5.0.0)

    angular_rails_csrf was resolved to 1.0.4, which depends on
      rails (< 5, >= 3)

githubを見ると

  s.add_runtime_dependency 'rails', '>= 3', '< 5'

と書いてあったので、

  s.add_runtime_dependency 'rails', '>= 3'

にしたら動くのではないかと思って、リポジトリをローカル保存して

gem 'angular_rails_csrf', :path => 'vendor/localgems/angular_rails_csrf'

こんな感じのGemfileを書いたらうまくインストールできました。

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
0