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:

chris@chris-VirtualBox:~/cartsite$ gedit Gemfile
#Add gem to Gemfile
gem 'bcrypt-ruby'
#Run bundle install
chris@chris-VirtualBox:~/cartsite$ bundle install
Using rake ( 
Using i18n (0.6.0) 
Using multi_json (1.3.6) 
Using uglifier (1.2.4) 
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