Tag Archives: Ubuntu 12.04

Error while installing mysql2 gem on Ubuntu 12.04

This week I have install ubuntu 12.04 .When install on gem install mysql2 -v ‘0.3.11’ I got this error.

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

/home/salayhin/.rvm/rubies/ruby-1.9.3-p194/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 *** Continue reading Error while installing mysql2 gem on Ubuntu 12.04

Install Ruby on Rails with MySQL on Ubuntu 12.04

I have start working with Ruby and Ruby on Rails. I have faced some problem to install Ruby and Ruby on rails development environment  in my ubuntu. For this I share my experience to install ruby on rails development environment in ubintu.

Ruby on Rails:

Ruby on Rails, often shortened to Rails, is an open source full-stack web application framework for the  Ruby programming language.It  is one of the most popular framework for developing web applications using Agile approach. Rails (Latest version : 3.2) is based MVC (Model View Framework).  Here I show step by step installation via RVM (Ruby Version Manager).  Although RVM is not strictly necessary but it’s strongly recommended – it will allow you to use multiple versions of Ruby, which may be be required in some cases.

step 1. Install dependencies:

First you have to install git.

Git Install command :

sudo apt-get install git

Install Curl : Curl is a command line tool to get a file from FTP/HTTP/HTTPS server. To install, open terminal and execute the command –

sudo apt-get install curl

Continue reading Install Ruby on Rails with MySQL on Ubuntu 12.04

Install Oracle Java 7 JDK 7 in Ubuntu 12.04

I faced some problem to install Oracle Java JDK installing on ubuntu 12.04 . here is a solution I found and it’s worked for me.

Here is step by step instruction  of install Java Runtime .

Open Terminal. Then,  run the commands below to remove all other installations of OpenJDK from your system.

sudo apt-get purge openjdk*

Then, go and download Java JDK package from here.

Run the below commands to extract the java packages you downloaded.

tar -xvf ~/Downloads/jdk-7u3-linux-i586.tar.gz

Now create your java  folder by running the commands below.

sudo mkdir -p /usr/lib/jvm/jdk1.7.0

Now run this command for move all the extracted files and folders into the java  folder.

sudo mv jdk1.7.0_03/* /usr/lib/jvm/jdk1.7.0/

Next, run those commands as shown below one-at-a-time to enable Java JDK. Remember to press Enter after each line.

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1

That’s it.

Install Oracle Java Runtime (JRE) 7 in Ubuntu 12.04

I faced some problem to install Oracle Java Runtime installing on ubuntu 12.04 . here is a solution I found and it’s worked for me.

Here is step by step instruction  of install Java Runtime .

Open Terminal. Then,  run the commands below to remove all other installations of OpenJDK from your system.

sudo apt-get purge openjdk*

Then, go and download Java JRE package from here.

Run the below commands to extract the java packages you downloaded.

tar -xvf ~/Downloads/jre-7u3-linux-i586.tar.gz

Now create your java 7 folder by running the commands below.

sudo mkdir -p /usr/lib/jvm/jre1.7.0

Now run this command for move all the extracted files and folders into the java 7 folder.

sudo mv jre1.7.0_03/* /usr/lib/jvm/jre1.7.0/

This commands will install / update java 7

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jre1.7.0/bin/java 0

That’s it.

Install GIMP 2.8 on ubuntu 12.04

I have faced problem when installing gimp from software center. Then I found this solution from google.

To install Gimp 2.8 on Ubuntu 12.04 open Terminal (Press Ctrl+Alt+T) and copy the following commands in the Terminal:

sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp
sudo apt-get install gimp-plugin-registry

Install Resynthesizer Plugin with following command (It is not from above PPA):

sudo apt-get install gimp-resynthesizer

Enjoy 🙂

Install PHP5, MySQL, Apache on Ubuntu 12.04

I will show you how to install a LAMP system. LAMP stands for Linux, Apache, MySQL, PHP. The guide is intended to help those who have very little knowlegde of using Linux.

Install Apache:

To install Apache run this command –

sudo apt-get install apache2

Testing Apache

To make sure apache installed correctly enter this URL or your web browser.

http://localhost/

Then you will see a message saying “It works!” . That means Apache is running in your machine.

Install PHP

For install PHP5 run this command –

sudo apt-get install php5 libapache2-mod-php5

Then restart apache with this command

sudo /etc/init.d/apache2 restart

or

sudo service apache2 restart

Continue reading Install PHP5, MySQL, Apache on Ubuntu 12.04