For an internal Rails server of a customer I have set-up
Ruby on Rails with passenger on Ubuntu 11.10. This is
the raw log of the set-up commands.
WARNING: this system is not secured for exposure to the
Internet. Additional security measures are required
for a publicly accessible server.
Setting up ssh and some typical work directories:
123456789101112131415161718192021
cdmkdir .ssh
chmod 700 .ssh
cd .ssh
vim authorized_keys2
vim id_rsa # needed to call out to githubchmod 600 authorized_keys2
chmod 600 id_rsa
cdmkdir -p data/backed_up
ln -s data/backed_up/ b
cd b
mkdir -p github/petervandenabeele
cd github/petervandenabeele
git clone git@github.com:petervandenabeele/stuff.git
cd stuff/rc_files/
ls -al
cp \.* ~/ # .rc files for standard appscd. .bashrc
l # should now do `ls -l`
Basic software and development dependencies:
123
sudo apt-get install vim postgresql apache2 git-core curl subversion
sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison tcl
# do NOT install ruby, passenger etc. through apt-get
Ruby 1.8.7 and 1.9.3
1234567891011121314151617181920212223242526
cd ~/data/
mkdir temp ; cd temp
mkdir ruby ; cd ruby
# first ruby 1.8.7 (miniprelude problems)svn co http://svn.ruby-lang.org/repos/ruby/tags/v1_8_7_357
cd v1_8_7_367
autoconf
cd ..
mkdir build_1_8_7 ; cd build_1_8_7
../v1_8_7_357/configure
make
sudo make install
ruby -ve 'puts 4'# => successcd ..
# now ruby 1.9.3svn co http://svn.ruby-lang.org/repos/ruby/tags/v1_9_3_0
cd v_1_9_3_0
autoconf
cd ..
mkdir build ; cd build
../v1_9_3_0/configure
make
sudo make install
ruby -ve 'puts 4'#=> success
Install Passenger
12345678910111213141516171819202122232425
# For rails 3.2.0.rc2 we need at least rubygems 1.8.14# also, 1.8.15 fixes a yaml bug, so 1.8.15 seems goodsudo gem update --system 1.8.15
sudo gem install passenger
sudo apt-get install libcurl4-openssl-dev apache2-prefork-dev libapr1-dev libaprutil1-dev
sudo passenger-install-apache2-module
# adapt the exact versions below to the output of passenger installercd /etc/apache2/mods-available
sudo sh -c "echo 'PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.11' >> passenger.conf"sudo sh -c "echo 'PassengerRuby /usr/local/bin/ruby' >> passenger.conf"cat passenger.conf
# PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.11# PassengerRuby /usr/local/bin/rubysudo sh -c "echo 'LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.11/ext/apache2/mod_passenger.so' >> passenger.load"cat passenger.load
# LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.11/ext/apache2/mod_passenger.socd ../mods-enabled
sudo ln -s ../mods-available/passenger.conf
sudo ln -s ../mods-available/passenger.load
sudo service apache2 restart
# the restart should not fail
A demo Rails project. Use Capistrano or at least git clone
from the development system for deployment of real apps.
123456789101112131415
cd ; cd b ; mkdir projects ; cd projects
sudo gem install rails --version 3.2.0.rc2
... # success27 gems installed
rails new demo --skip-bundle
cd demo
echo"gem 'therubyracer'" >> Gemfile
bundle install # to create a Gemfile.lock ; do NOT do this with real appsbundle install --deployment --without development testrake environment # should not fail# just to test, set up a Home controller, make routes 'root' point to itmv public/index.html public/index-original.html
RAILS_ENV=production bundle exec rake assets:precompile
Set-up the virtual host for this demo app
123456789101112131415161718192021
# create file (as sudo) sites-available/demo<VirtualHost *>
ServerName demo.localhost
DocumentRoot /home/peterv/b/projects/demo/public
RailsSpawnMethod smart
RailsEnv production
</VirtualHost>
# add a symlink from ../sites-enabled/demo to ../sites-available/demo# remove the symlink to ../sites-available/default# restart server withsudo service apache2 restart
touch ~/b/projects/demo/tmp/restart.txt
curl localhost | grep Welcome
# => <p>Welcome to Rails</p># WARNING: Additional measures are required to secure# the site for public use. Only use internally.
Some basic performance tests
1234567891011
ab -c5 -n100 localhost/?test=36
# Percentage of the requests served within a certain time (ms)# 50% 69# 66% 73# 75% 76# 80% 78# 90% 81# 95% 84# 98% 90# 99% 90# 100% 90 (longest request)
Passenger and Apache have a lot more options, but for a simple
internal server, this can be a start.
In the Gemfile of a new Rails 3 application,
this section is commented out by default:
Gemfile
123
...# To use debugger# gem 'ruby-debug19', :require => 'ruby-debug'
Uncommenting the last line will install ruby-debug19
and dependencies (including linecache19).
However, in the combination of rvm with ruby 1.9.3 on Ubuntu
this fails. The bundle install command hangs forever on
the installation of linecache19 (until interrupted with Control-C):
12345678
$ bundle install
Fetching source index for http://rubygems.org/
Using rake (0.9.2.2)...
Installing linecache19 (0.5.12) with native extensions
^C
Interrupt: An error occured while installing linecache19 (0.5.12), and Bundler cannot continue.
Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling.
The root cause of the problem was not clear, but I was able to
make this pass with a “manual” gem install of linecache19 and
ruby-debug-base19 with an explicit include of an extra source
directory:
12345678910111213141516171819
$ gem install linecache19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p0
Building native extensions. This could take a while...
Successfully installed linecache19-0.5.12
1 gem installed
$ bundle install
Fetching source index for http://rubygems.org/
...
Installing ruby-debug-base19 (0.11.25) with native extensions ^C
Interrupt: An error occured while installing ruby-debug-base19 (0.11.25), and Bundler cannot continue.
Make sure that `gem install ruby-debug-base19 -v '0.11.25'` succeeds before bundling.
...
$ gem install ruby-debug-base19 -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p0
Building native extensions. This could take a while...
Successfully installed ruby-debug-base19-0.11.25
1 gem installed
$ bundle install
...
Your bundle is complete! ...
$
Once this hurdle is passed, a second problem arises …
The currently published versions of ruby-debug-base and linecache19
12
ruby-debug-base19 (0.11.25)linecache19 (0.5.12)
raise exceptions on Rails on ruby 1.9.3
123456
.../gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `require':.../gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so: undefined symbol: ruby_current_thread -.../gems/ruby-debug-base19-0.11.25/lib/ruby_debug.so (LoadError) from .../gems/ruby-debug-base19-0.11.25/lib/ruby-debug-base.rb:1:in `<top (required)>' from .../gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `require' from .../gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:5:in `<top (required)>'
The solution for this problem is found on a number of blog posts:
gem install those 2 gems from the local Download location, with the above include trick into the current rvm gemset
12345678
$ gem install ~/Downloads/linecache19-0.5.13.gem -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p0
Building native extensions. This could take a while...
Successfully installed linecache19-0.5.13
1 gem installed
$ gem install ~/Downloads/ruby-debug-base19-0.11.26.gem -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p0
Building native extensions. This could take a while...
Successfully installed ruby-debug-base19-0.11.26
1 gem installed
force the Gemfile to use these version
12345
# To use debuggergem'linecache19','0.5.13',:path=>"~/.rvm/gems/ruby-1.9.3-p0/gems/linecache19-0.5.13/"gem'ruby-debug-base19','0.11.26',:path=>"~/.rvm/gems/ruby-1.9.3-p0/gems/ruby-debug-base19-0.11.26/"gem'ruby-debug19',:require=>'ruby-debug'
run bundle install
Once these higher level gems are used, using the ruby-debugger works. E.g. in an rspec test spec:
This is the detailed log of an installation of Ruby and
Rails on a freshly installed Ubuntu 11.10 (client version,
32-bit on an x86 PC). I started logging straight after
the Ubuntu install, so all steps are logged.
Why rvm (and not native ruby packages)
There may be debate, but I have found that for a development
system, it is increadibly easy to use rvm, with it’s different
ruby versions, different gemsets per project.
In practice that means I do NOT run apt-get install ruby at
any time …
Some basic stuff
1234567
$ sudo apt-get install vim vim-runtime
# take a copy of your .bashrc since it will be# modified by rvm install$ cp .bashrc .bashrc.ORIGINAL
# install some requirements for rvm install$ sudo apt-get install curl libcurl3
$ sudo apt-get install git-core liberror-perl
Install rvm
Based on http://beginrescueend.com/rvm/install/
execute a single user install of rvm
$ sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
...
The following NEW packages will be installed:
autoconf automake autotools-dev bison build-essential dpkg-dev g++ g++-4.6
git-core libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libapr1 libaprutil1 libdpkg-perl libltdl-dev
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev libssl-doc
libstdc++6-4.6-dev libsvn1 libtimedate-perl libtinfo-dev libtool libxml2-dev
libxslt1-dev libyaml-0-2 libyaml-dev m4 sqlite3 subversion zlib1g-dev
...
Setting up m4 (1.4.16-1) ...
Setting up autoconf (2.68-1ubuntu1) ...
Setting up autotools-dev (20110511.1) ...
Setting up automake (1:1.11.1-1ubuntu1) ...
update-alternatives: using /usr/bin/automake-1.11 to provide /usr/bin/automake (automake) in auto mode.
Setting up bison (1:2.4.1.dfsg-3) ...
update-alternatives: using /usr/bin/bison.yacc to provide /usr/bin/yacc (yacc) in auto mode.
Setting up libtimedate-perl (1.2000-1) ...
Setting up libdpkg-perl (1.16.0.3ubuntu5) ...
Setting up dpkg-dev (1.16.0.3ubuntu5) ...
Setting up git-core (1:1.7.5.4-1) ...
Setting up libalgorithm-diff-perl (1.19.02-2) ...
Setting up libalgorithm-diff-xs-perl (0.04-1build1) ...
Setting up libalgorithm-merge-perl (0.08-2) ...
Setting up libapr1 (1.4.5-1) ...
Setting up libaprutil1 (1.3.12+dfsg-2) ...
Setting up libltdl-dev (2.4-2ubuntu1) ...
Setting up libtinfo-dev (5.9-1ubuntu5) ...
Setting up libncurses5-dev (5.9-1ubuntu5) ...
Setting up libreadline6-dev (6.2-2ubuntu1) ...
Setting up libsqlite3-dev (3.7.7-2ubuntu2) ...
Setting up zlib1g-dev (1:1.2.3.4.dfsg-3ubuntu3) ...
Setting up libssl-dev (1.0.0e-2ubuntu4) ...
Setting up libssl-doc (1.0.0e-2ubuntu4) ...
Setting up libsvn1 (1.6.12dfsg-4ubuntu5) ...
Setting up libtool (2.4-2ubuntu1) ...
Setting up libxml2-dev (2.7.8.dfsg-4) ...
Setting up libxslt1-dev (1.1.26-7) ...
Setting up libyaml-0-2 (0.1.4-1) ...
Setting up sqlite3 (3.7.7-2ubuntu2) ...
Setting up subversion (1.6.12dfsg-4ubuntu5) ...
Setting up libyaml-dev (0.1.4-1) ...
Setting up libstdc++6-4.6-dev (4.6.1-9ubuntu3) ...
Setting up g++-4.6 (4.6.1-9ubuntu3) ...
Setting up g++ (4:4.6.1-2ubuntu5) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode.
Setting up build-essential (11.5ubuntu1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
First install a 1.8.7 ruby as indicated
123
$ rvm install 1.8.7
...
Install of ruby-1.8.7-p352 - #complete
Now check the available ruby’s in rvm
12345678910111213141516
$ rvm list known | head -15
# MRI Rubies[ruby-]1.8.6[-p420][ruby-]1.8.6-head
[ruby-]1.8.7[-p352][ruby-]1.8.7-head
[ruby-]1.9.1-p378
[ruby-]1.9.1[-p431][ruby-]1.9.1-head
[ruby-]1.9.2-p180
[ruby-]1.9.2[-p290][ruby-]1.9.2-head
[ruby-]1.9.3-preview1
[ruby-]1.9.3-rc1
[ruby-]1.9.3[-p0][ruby-]1.9.3-head
Install the lastest ruby 1.9.3
12345678
$ rvm install 1.9.3
...
Install of ruby-1.9.3-p0 - #complete # test that ruby is installed~$ rvm use 1.9.3
Using /home/peterv/.rvm/gems/ruby-1.9.3-p0
~$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570)[i686-linux]
Now make and use a gemset for rails 3.1
1234567
~$ rvm gemset create rails31
'rails31' gemset created (/home/peterv/.rvm/gems/ruby-1.9.3-p0@rails31).
~$ # and use this rails 31 gemset~$ rvm gemset use rails31
Using /home/peterv/.rvm/gems/ruby-1.9.3-p0 with gemset rails31
~$ rvm current
ruby-1.9.3-p0@rails31
~/data/git$ rails new NewProject -d postgresql -T
create
...
Fetching source index for http://rubygems.org/
Using rake (0.9.2.2)Using multi_json (1.0.3)Using activesupport (3.1.3)Using builder (3.0.0)Using i18n (0.6.0)Using activemodel (3.1.3)Using erubis (2.7.0)Using rack (1.3.5)Using rack-cache (1.1)Using rack-mount (0.8.3)Using rack-test (0.6.1)Using hike (1.2.1)Using tilt (1.3.3)Using sprockets (2.0.3)Using actionpack (3.1.3)Using mime-types (1.17.2)Using polyglot (0.3.3)Using treetop (1.4.10)Using mail (2.3.0)Using actionmailer (3.1.3)Using arel (2.2.1)Using tzinfo (0.3.31)Using activerecord (3.1.3)Using activeresource (3.1.3)Using bundler (1.0.21)Installing coffee-script-source (1.1.3)Installing execjs (1.2.9)Installing coffee-script (2.2.0)Using rack-ssl (1.3.2)Using json (1.6.1)Using rdoc (3.11)Using thor (0.14.6)Using railties (3.1.3)Installing coffee-rails (3.1.1)Installing jquery-rails (1.0.19)Installing pg (0.11.0) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
Gem files will remain installed in /home/peterv/.rvm/gems/ruby-1.9.3-p0@rails31/gems/pg-0.11.0 for inspection.
Results logged to /home/peterv/.rvm/gems/ruby-1.9.3-p0@rails31/gems/pg-0.11.0/ext/gem_make.out
An error occured while installing pg (0.11.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.11.0'` succeeds before bundling.
So, this fails because a postgresql development library is missing.
Most often in such a case, it is the lib-…-dev package that is missing.
These are not installed by default in Ubuntu client version.
A good way to resolve this is to use apt-cache search to find the
dev lib. Also compare with
1
dpkg -l '*package*' | grep ^ii
to see what is actually installed.
In this case, this line in the error message points us to a ‘pq’ file missing:
1
# ==> Can't find the 'libpq-fe.h header
This is the result of searching for ‘pq’ in apt-cache :
1234567
~/data/git$ apt-cache search postgresql | grep lib | grep dev | grep pq
libpq-dev - header files for libpq5 (PostgreSQL library)libpqxx3-dev - C++ library to connect to PostgreSQL (development files)libapq-postgresql1-dev - APQ Ada 95 Postgresql Binding Plugin (development)libapq1-dev - A pluggable Ada 95 Binding to various database systems (development)libpostgresql-ocaml-dev - OCaml bindings to PostgreSQL's libpq
libpqxx-dev - C++ library to connect to PostgreSQL (development files)
Let’s try the first one : libpq-dev (others are for other languages)
12345
~/data/git$ sudo apt-get install libpq-dev
...
The following NEW packages will be installed:
comerr-dev krb5-multidev libgssrpc4 libkadm5clnt-mit8 libkadm5srv-mit8
libkdb5-5 libkrb5-dev libpq-dev libpq5
Let’s try again the bundle install
123456789
~/data/git$ cd NewProject/
~/data/git/NewProject$ bundle install
...
Installing pg (0.11.0) with native extensions
Using rails (3.1.3)Installing sass (3.1.10)Installing sass-rails (3.1.5)Installing uglifier (1.1.0)Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
So, this time it worked :-)
Add the rubyracer to the Gemfile to allow a first check
123456789
~/data/git/NewProject$ echo"gem 'therubyracer'" >> Gemfile
~/data/git/NewProject$ bundle install
Fetching source index for http://rubygems.org/
...
Installing libv8 (3.3.10.4)...
Installing therubyracer (0.9.9) with native extensions
...
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.
~/data/git/NewProject$ git init
Initialized empty Git repository in /home/peterv/data/git/NewProject/.git/
~/data/git/NewProject$ git add .
~/data/git/NewProject$ git commit -m "Initial commit of rails new -d postgresql -T"
Make sure this project is always ran with this ruby version and gemset.
1234567891011121314151617181920212223
~/data/git/NewProject$ vim .rvmrc
~/data/git/NewProject$ cat .rvmrc
rvm use 1.9.3
rvm gemset use rails31
~/data/git/NewProject$ cd ..
~/data/git$ cd NewProject/
===============================================================================NOTICE================================================================================ RVM has encountered a new or modified .rvmrc file in the current directory== This is a shell script and therefore may contain any shell commands. ==== Examine the contents of this file carefully to be sure the contents are== safe before trusting it! ( Choose v[iew] below to view the contents )===============================================================================Do you wish to trust this .rvmrc file? (/home/peterv/data/git/NewProject/.rvmrc)y[es], n[o], v[iew], c[ancel]> yes
Using /home/peterv/.rvm/gems/ruby-1.9.3-p0
Using /home/peterv/.rvm/gems/ruby-1.9.3-p0 with gemset rails31
Now using gemset 'rails31'Using /home/peterv/.rvm/gems/ruby-1.9.3-p0 with gemset rails31
~/data/git/NewProject$ git add .rvmrc
~/data/git/NewProject$ git commit -m "Add a .rvmrc for 1.9.3@rails31"
Now the rvm ruby version and gemset are set by rvm each time you
enter this directory (with cd).
We now have a working and stable environment for Ruby, Rails and rvm,
specifically for this project.
Installing postgresql server
Also, the postgresql server needs to be installed:
12345
~/data/git/NewProject$ sudo apt-get install postgresql
...
The following NEW packages will be installed:
postgresql postgresql-9.1 postgresql-client-9.1 postgresql-client-common
postgresql-common
Installing mysql2 gem and mysql server
A similar problem of missing -dev library occurs when try to install
the mysql2 gem. This is the error message and the resolution
123456789101112131415161718192021222324252627
~/data/git/NewProject$ grep mysql2 Gemfile
gem 'mysql2'~/data/git/NewProject$ bundle install
Fetching source index for http://rubygems.org/
...
Installing mysql2 (0.3.10) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
...
First install the ‘mysql-client’ and ‘mysql-server’ packages.
1234567
~/data/git/NewProject$ sudo apt-get install mysql
...
The following NEW packages will be installed:
libdbd-mysql-perl libdbi-perl libhtml-template-perl libnet-daemon-perl
libplrpc-perl mysql-client mysql-client-5.1 mysql-client-core-5.1
mysql-server mysql-server-5.1 mysql-server-core-5.1
...
Trying again to install the mysql2 gem with bundle install:
123456789101112131415161718192021222324
~/data/git/NewProject$ bundle install
...
Installing mysql2 (0.3.10) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/peterv/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
...
It is clear that the mysql2 build requires functionality in
the ‘mysqlclient’ library (a library in gcc is called with
‘l’). So let’s look for the -dev package
associated with the mysqlclient package.
12345678
~/data/git/NewProject$ apt-cache search libmysql | grep '\-dev'libmysqlclient-dev - MySQL database development files
libmysqlclient16-dev - MySQL database development files - empty transitional package
libmysqlcppconn-dev - MySQL Connector for C++ (development files)libmysqld-dev - MySQL embedded database development files
libmysql++-dev - MySQL C++ library bindings (development)libmysql-cil-dev - MySQL database connector for CLI
libmysql-ocaml-dev - OCaml bindings for MySql
Again, the first result ‘libmysqlclient-dev’ seems most promising.
1234
~/data/git/NewProject$ sudo apt-get install libmysqlclient-dev
...
The following NEW packages will be installed:
libmysqlclient-dev
And yes, now the gem installation with native compilation for mysql2
works out :-).
12345
~/data/git/NewProject$ bundle install
...
Installing mysql2 (0.3.10) with native extensions
...
Your bundle is complete! ...
A list of Debian/Ubuntu package dependencies for gem/bundle install