I get the above error when i run rake db:create. I have rvm installed and it's already set to 2.1.6 Bundle install runs perfectly without any error, with following output :
Using rake 11.3.0
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.10.1
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using rack 1.5.5
Using mime-types-data 3.2016.0521
Using arel 5.0.1.20140414130214
Using babel-source 5.8.35
Using execjs 2.7.0
Using byebug 9.0.5
Using coderay 1.1.1
Using coffee-script-source 1.10.0
Using thor 0.19.4
Using connection_pool 2.2.0
Using diff-lcs 1.2.5
Using multipart-post 2.0.0
Using hike 1.2.3
Using simple_oauth 0.2.0
Using multi_json 1.12.1
Using kgio 2.10.0
Using libv8 3.16.14.15
Using method_source 0.8.2
Using pg 0.19.0
Using slop 3.6.0
Using bundler 1.13.6
Using tilt 1.4.1
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.5
Using raindrops 0.17.0
Using ref 2.0.0
Using rspec-support 3.4.1
Using sass 3.2.19
Using rdoc 4.2.2
Using tzinfo 1.2.2
Using rack-test 0.6.3
Using mime-types 3.1
Using babel-transpiler 0.7.0
Using uglifier 3.0.0
Using coffee-script 2.4.1
Using faraday 0.9.2
Using pry 0.10.4
Using sprockets 2.12.4
Using rails_12factor 0.0.3
Using unicorn 5.2.0
Using therubyracer 0.12.2
Using rspec-core 3.4.4
Using rspec-expectations 3.4.0
Using rspec-mocks 3.4.1
Using sdoc 0.4.1
Using activesupport 4.1.6
Using mail 2.6.4
Using faraday_middleware 0.10.0
Using actionview 4.1.6
Using activemodel 4.1.6
Using jbuilder 1.5.3
Using ims-lti 2.0.0.beta.41
Using actionpack 4.1.6
Using activerecord 4.1.6
Using actionmailer 4.1.6
Using railties 4.1.6
Using sprockets-rails 2.3.3
Using coffee-rails 4.0.1
Using jquery-rails 3.1.4
Using lodash-rails 3.7.0
Using rspec-rails 3.4.2
Using rails 4.1.6
Using sass-rails 4.0.5
Using turbolinks 2.5.3
Using rails_lti2_provider 0.0.1 from https://github.com/rivernate/rails_lti2_provider.git (at 42ea6ba@42ea6ba)
Using react-rails 1.5.0
Bundle complete! 20 Gemfile dependencies, 73 gems now installed.