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

which OS are you using? anyway if you are using ubuntu, from this https://github.com/brianmario/mysql2/issues/8 run: sudo apt-get install mysql-client libmysqlclient-dev Otherwise for Mac users,(use brew to install) check this Link, or run: brew install mysql then sudo gem install mysql2 and for windows users check the link below for a solution. Error installing mysql2: Failed … Read more

Bundler cannot install any gems without sudo

You may host gems in your user home folder, that does not need root permissions: bundle install –path ~/.gem To avoid passing this parameter manually add export GEM_HOME=$HOME/.gem to your .bash_profile — this solves sudo issue on Mac OS and other *nix systems. You then also might need to have access to gems that provide … Read more

How to use bundler behind a proxy?

OSX & Linux export http_proxy=http://user:password@host:port export HTTP_PROXY=$http_proxy If it’s using HTTPS, set it as well export https_proxy=http://user:password@host:port export HTTPS_PROXY=$https_proxy If you use sudo, by default sudo does not preserves http proxy variable. Use -E flag to preserve it $ sudo -E bundle install to make sudo preserves environment variables by default: Bash http_proxy: from a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)