2

I'm actually deploying my app to Rackspace and trying to use their cloud database service with mysql.

as it's a remote database, i'm sure i have to add the gem for mysql to my gemfile, but i'm not sure if i need to install mysql in my app server (that does not make sense to me).

Should i install it on my server? is there other way to go or i'm missing something?

Any advice will be appreciated.

Log Error

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/admin/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb 
An error occurred while installing mysql2 (0.3.16), and Bundler cannot continue.
brayancastrop
  • 381
  • 5
  • 17

1 Answers1

0

but i'm not sure if i need to install mysql in my app server (that does not make sense to me).

Yes you do.

We use Rackspace too - something you might want to know their cloud MYSQL instances can only be accessed from servers inside their datacenters. Amazing security :)

--

MYSQL

You have to install MYSQL on your app server because MYSQL connectivity needs the MYSQL headers to connect to a third-party database. This is only possible with the linux (I presume) headers on your system.

If you're running Linux, you may wish to reference this question:

sudo apt-get install libmysql-ruby libmysqlclient-dev

This will allow you to instal the MYSQL header files, which should let the MYSQL gem install for you. This will not run a local MYSQL server; just provide you with the necessary DLL files to help it connect to your actual mysql server

Community
  • 1
  • 1
Richard Peck
  • 76,116
  • 9
  • 93
  • 147