Priyanka Chabbi
Priyanka Chabbi

Reputation: 41

Mysql2 gem installation issue on ubuntu with ruby on rails

I am unable to install mysql2 gem . I have recently installed ruby 2 and rails 4 version . I am not able to install mysql2 gem, getting the below error when i run the command gem install mysql2: Some index files failed to download. They have been ignored, or old ones used instead.

Upvotes: 1

Views: 637

Answers (2)

bigsolom
bigsolom

Reputation: 2349

Make sure that the following packages are installed first

sudo apt-get install mysql-client mysql-server libmysqlclient-dev

You may need to run

sudo apt-get update

before installing them

Upvotes: 2

sugaryourcoffee
sugaryourcoffee

Reputation: 879

You should provide more information. But here some thoughts:

  • Why are you using gem install mysql2 instead of adding the gem to your Gemfile and run bundle?
  • I had some issues with Rails 4 and mysql2 v0.4.x and downgraded to v0.3.20

Upvotes: 0

Related Questions