質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

Q&A

解決済

1回答

1708閲覧

rails g sorcery:install ができない

n.k8808

総合スコア25

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

Ruby on Rails

Ruby on Railsは、オープンソースのWebアプリケーションフレームワークです。「同じことを繰り返さない」というRailsの基本理念のもと、他のフレームワークより少ないコードで簡単に開発できるよう設計されています。

0グッド

0クリップ

投稿2017/11/19 13:13

rails でsorceryが利用できません

ruby

1gem 'sorcery' #gemfileに追加

bundle install

ですが、
rails g sorcery:install
と入力すると

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bcrypt-3.1.11-x64-mingw32/lib/bcrypt.rb:16:in `require': cannot load such file -- bcrypt_ext (LoadError) from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bcrypt-3.1.11-x64-mingw32/lib/bcrypt.rb:16:in `rescue in <top (required)>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/bcrypt-3.1.11-x64-mingw32/lib/bcrypt.rb:12:in `<top (required)>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sorcery-0.11.0/lib/sorcery/crypto_providers/bcrypt.rb:1:in `require' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sorcery-0.11.0/lib/sorcery/crypto_providers/bcrypt.rb:1:in `<top (required)>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sorcery-0.11.0/lib/sorcery.rb:46:in `require' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sorcery-0.11.0/lib/sorcery.rb:46:in `<module:CryptoProviders>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sorcery-0.11.0/lib/sorcery.rb:43:in `<module:Sorcery>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/sorcery-0.11.0/lib/sorcery.rb:3:in `<top (required)>' from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81:in `require' from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:81:in `block (2 levels) in require' from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:76:in `each' from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:76:in `block in require' from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:65:in `each' from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/bundler/runtime.rb:65:in `require' from C:/Ruby24-x64/lib/ruby/site_ruby/2.4.0/bundler.rb:114:in `require' from D:/eruku/eruku/config/application.rb:7:in `<top (required)>' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/command/actions.rb:15:in `require' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/command/actions.rb:15:in `require_application_and_environment!' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/commands/generate/generate_command.rb:19:in `perform' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/command/base.rb:63:in `perform' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/command.rb:44:in `invoke' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/railties-5.1.4/lib/rails/commands.rb:16:in `<top (required)>' from bin/rails:4:in `require' from bin/rails:4:in `<main>'

sorcery.rb が生成されません
ネットで調べたものの解決策が見つからず

ruby 2.4.2p198 (2017-09-14 revision 59899) [x64-mingw32]
Rails 5.1.4
windows環境です

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2017/11/20 00:52

bcryptはインストールされていますか?
n.k8808

2017/11/20 08:26

いえ してません
guest

回答1

0

ベストアンサー

Windows環境下でBcryptがうまく動作しないことがあるようです。

https://github.com/codahale/bcrypt-ruby/issues/149
https://github.com/Sorcery/sorcery/issues/75

上記Issueの通りGemfileを以下のようにしてみてください。

gem 'bcrypt', git: 'https://github.com/codahale/bcrypt-ruby.git', require: 'bcrypt' gem 'sorcery'

投稿2017/11/20 08:43

退会済みユーザー

退会済みユーザー

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

n.k8808

2017/11/20 09:03

ありがとうございます windwosだとやはり、うまく動作しないものもあるようで linuxを使って見たいと思います。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問