简体   繁体   中英

Rails Tutorial Sample App 6.26

I am following along with the sample_app everything runs create and all specs pass until I get to 6.26. As soon as I add the has_secure_password to the User class I receive a Ruby interpreter error that is 1899 lines long. The buffer in vim only shows up to line 600 so I can't even get to the root of the problem. I have verified that I have all of the gems with the correct version numbers. Not sure where to go from here. I am not sure where to start debugging from here. I have made sure to rake db:migrate and rake db:test:prepare. Any help in where to start debugging or direction to take would be great.

Thanks

You're probably missing the bcrypt-ruby gem.

You need to add bcrypt-ruby (~> 3.0.0) to Gemfile to use has_secure_password:

gem 'bcrypt-ruby', '~> 3.0.0'

This error had nothing to do with Rails Tutorial or RSpec. It ended up being an issue with running guard within a tmux session. Everything works fine if I open a second tab and run guard in a standard terminal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM