Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There was an error while trying to load the gem 'mysql2'. Gem Load Error is: uninitialized constant Mysql2::Client::SECURE_CONNECTION #27

Open
cs-chandu opened this issue May 1, 2017 · 0 comments

Comments

@cs-chandu
Copy link

chandu@Chandu:~/Documents/angel_nest$ rake db:create rake aborted! There was an error while trying to load the gem 'mysql2'. Gem Load Error is: uninitialized constant Mysql2::Client::SECURE_CONNECTION Backtrace for gem load error is: /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rake/ext/module.rb:36:in const_missing'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11/lib/mysql2/client.rb:12:in <class:Client>' /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11/lib/mysql2/client.rb:2:in module:Mysql2'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11/lib/mysql2/client.rb:1:in <top (required)>' /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11/lib/mysql2.rb:10:in require'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11/lib/mysql2.rb:10:in <top (required)>' /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in require'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.14.6/lib/bundler/runtime.rb:91:in block (2 levels) in require' /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in each'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.14.6/lib/bundler/runtime.rb:86:in block in require' /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in each'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.14.6/lib/bundler/runtime.rb:75:in require' /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/gems/1.9.1/gems/bundler-1.14.6/lib/bundler.rb:107:in require'
/home/chandu/Documents/angel_nest/config/application.rb:13:in <top (required)>' /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' /home/chandu/Documents/angel_nest/Rakefile:5:in <top (required)>'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rake/rake_module.rb:25:in load' /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rake/rake_module.rb:25:in load_rakefile'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rake/application.rb:501:in raw_load_rakefile' /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rake/application.rb:82:in block in load_rakefile'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rake/application.rb:133:in standard_exception_handling' /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rake/application.rb:81:in load_rakefile'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rake/application.rb:65:in block in run' /home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rake/application.rb:133:in standard_exception_handling'
/home/chandu/.rbenv/versions/1.9.3-p551/lib/ruby/1.9.1/rake/application.rb:63:in run' /home/chandu/.rbenv/versions/1.9.3-p551/bin/rake:32:in

'
Bundler Error Backtrace:

(See full trace by running task with --trace)
chandu@Chandu:~/Documents/angel_nest$
`

I am getting above error... I dont know what to do trying since last three days .. BTW I am using Ubuntu 16.04 machine, RubyEnv ~ Ruby 1.9.3 , Rails 3.2.2 . Somebody said its because of mysql version so I am downgrading to 5.1. will it works??
Please help me with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant