I'm beginner in Ruby on Rails and trying to learn from http://ruby.railstutorial.org/ I'm creating sample_app and got stuck at chapter 6.
My Ruby version: ruby 2.0.0p195 (2013-05-14) [i386-mingw32]
My Rails version: Rails 4.0.0
I have following line in my GemFile:
gem 'bcrypt-ruby', '~> 3.0.0'
If I type gem list bcrypt-ruby
, it shows bcrypt-ruby (3.0.1)
. But if I try to create user, I get error saying
You don't have bcrypt-ruby installed in your application. Please add it to your Gemfile and run bundle install
I searched a lot on rails website, bcrypt website & even stackoverflow. But, nothing worked. Please help.
Finally... Got it working. I didn't understand the exact issue but I made two important changes. I'm not sure which change made it working.
I uninstalled my old ruby & rails that were installed from railsinstaller
. Installed just ruby for my OS (64 bit which I was not able to choose while installing from railsinstaller
). Then I installed rails, sqlite3 separately.
Another important change I did is in Gemfile.lock
. I think this did the trick. I kept both of the following lines
bcrypt-ruby (3.0.0) bcrypt-ruby (3.0.0-x86-mingw32)