1

I got following error in my Application.

incompatible character encodings: ASCII-8BIT and UTF-8

I found solution for this for which i need to upgrade mysql gem to mysql2 in remote server i.e. JOYENT.

When i run "gem install mysql2" i got following error

Error installing mysql2: ERROR: Failed to build gem native extension.

Now i want to know how can i install mysql2 on server?

I tried following

sudo apt-get install libmysql-ruby libmysqlclient-dev

Ref:- Error installing mysql2: Failed to build gem native extension

but when i run above command it gives me following error

/bin/sh: apt-get: not found

Now i want to know what steps i should follow so that i able to install mysql2

Community
  • 1
  • 1
Salil
  • 46,566
  • 21
  • 122
  • 156

1 Answers1

1

Following command works for me

gem install mysql2 -v 0.2.6

In gemfile

gem 'mysql2', '0.2.6'

In database.yml file

production:
  adapter: mysql2

Ref link:- http://discuss.joyent.com/viewtopic.php?id=29266

Salil
  • 46,566
  • 21
  • 122
  • 156