[ MySQL 5.5.54 : utf8mb4 ] Mysql2::Error: Specified key was too long; max key length is 767 bytes


Mysql2::Error: Specified key was too long; max key length is 767 bytes


mysql-server in Ubuntu 12.04.5 LTS will be version 5.5.54.

We need version 5.7 that enable `innodb_large_prefix` by default.

$ wget http://dev.mysql.com/get/mysql-apt-config_0.8.0-1_all.deb
$ sudo dpkg -i mysql-apt-config_0.8.0-1_all.deb
$ sudo apt-get update
$ sudo apt-get install mysql-server

After this, mysql-server will be version 5.7.


NOTE : to view innodb_large_prefix environment variable

show variables like 'innodb_large_prefix';

| Variable_name | Value |
| innodb_large_prefix | ON |
1 row in set (0.00 sec)



Another Problem

> show variables like 'innodb_large_prefix';

Table 'performance_schema.session_variables' doesn't exist


sudo mysql_upgrade -u root -p --force

sudo /etc/init.d/mysql restart


ref : https://askubuntu.com/questions/750498/mysql-5-5-update-to-mysql-5-7,



[ ubuntu ] install ruby 2.1.2 via rvm

You have broken version of RVM. Ubuntu does something to RVM that produces lots of errors.

Remove Ubuntu’s rvm

$ sudo apt-get --purge remove ruby-rvm
$ sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh
$ env | grep rvm

Install rvm

$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ curl -sSL https://get.rvm.io | bash -s stable --ruby
$ source /home/pong/.rvm/scripts/rvm
$ rvm install 2.1.2 --disable-binary

Need in .bashrc

source /home/pong/.rvm/scripts/rvm


Problem 1

If we got 100 error, Remove broken or 404 repos from your /etc/apt/sources.list.d/*.list

rvm will fail if you don’t remove or comment them out.

To work out which aren’t working, run “apt-get update” and see which ones are marked as failing.


Problem 2

Rails is not found

The program 'rails' is currently not installed

Solution 2

List all the version

$ rvm list rubies

Use the specific version 

by putting this in .bashrc

rvm use ruby-2.1.2



ref : http://stackoverflow.com/questions/9056008/installed-ruby-1-9-3-with-rvm-but-command-line-doesnt-show-ruby-v/9056395#9056395,



[ vagrant ] Guest Additions Version is not same as VirtualBox Version


$ vagrant up


default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default: Guest Additions Version: 5.1.18
default: VirtualBox Version: 5.0


$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Installed the plugin 'vagrant-vbguest (0.13.0)'!
$ vagrant up

ref: http://kvz.io/blog/2013/01/16/vagrant-tip-keep-virtualbox-guest-additions-in-sync/