Monthly Archives: June 2012

has_secure_password error – Ruby on Rails

Ran into the following error while using has_secure_password:

/usr/lib/ruby/gems/1.8/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:143:in `gem': bcrypt-ruby is not part of the bundle. Add it to Gemfile. (Gem::LoadError)

Thankfully the error is pretty self explanatory, you simply have to add the gem bcrypt-ruby:

  1. chris@chris-VirtualBox:~/cartsite$ gedit Gemfile
  1. #Add gem to Gemfile
  2. ...
  3. gem 'bcrypt-ruby'
  4. ...
  1. #Run bundle install
  2. chris@chris-VirtualBox:~/cartsite$ bundle install
  3. Using rake ( 
  4. Using i18n (0.6.0) 
  5. Using multi_json (1.3.6) 
  6. ...
  7. Using uglifier (1.2.4) 
  8. Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

Then you should be right to go, let me know if there are any issues.

Reserved Words – Oracle

Just a quick post on how to check if a word is reserved using the v$reserved_words:

FROM v$reserved_words
WHERE reserved = 'Y'

Alernatively you can specify the word, i.e. to check if online is a reserved word, run the following:

FROM v$reserved_words