Quando aggiungo has_secure_password al modello (ereditato da ActiveRecord :: Base), si verifica un errore che indica che "bcrypt-ruby non fa parte del pacchetto".Errore nel dichiarare che "bcrypt-ruby non fa parte del pacchetto", come posso aggiungere bcrypt-ruby a Gemfile?
Qui il log è:
Started GET "/users" for 127.0.0.1 at 2012-02-19 16:37:12 +0900
Gem::LoadError (bcrypt-ruby is not part of the bundle. Add it to Gemfile.):
app/models/user.rb:3:in `<class:User>'
app/models/user.rb:1:in `<top (required)>'
app/controllers/users_controller.rb:1:in `<top (required)>'
ho installato bcrypt-ruby da
$ gem install bcrypt-ruby
Building native extensions. This could take a while...
1 gem installed
Installing YARD (yri) index for bcrypt-ruby-3.0.1...
Installing RDoc documentation for bcrypt-ruby-3.0.1...
ma era inutilmente.
ho cercato
$ bundle exec rails server
ma era nessun aiuto.
Se commento la riga "has_secure_password", questo errore non viene visualizzato.
Come posso risolvere questo problema?
Ho avuto esattamente lo stesso problema. Riavviare il server è stato il trucco per me. – Raj