Skip to content
Apr 16 15

Installing ImageMagick in Ubuntu14.10

by tarique

sudo -i
apt-get install build-essential checkinstall && apt-get build-dep imagemagick -y
tar xzvf ImageMagick.tar.gz
cd ImageMagick-6.9.1-1/
./configure –prefix=/opt/imagemagick-6.9.1-1 && make

Dec 15 13

MySQL: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)

by tarique

I have recently installed MySQL in my Ubuntu Saucy. After installation finished, I get this error: ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO). I just followed the solution given by Edgar Aviles in StackOverFlow.
~$ mysql -u root -p
Enter Password:

mysql> grant all privileges on *.* to bill@localhost identified by 'pass' with grant option;

All honor goes to Edgar. cheers!

Sep 13 13

Rails: translation missing: en.activerecord

by tarique

I had the following exception when I was trying to develop Sample App by Micheal Hartle:

translation missing: en.activerecord.errors.messages.record_invalid

I had this because I did not have the English translations for active record. All I had to do is run rake db:reset and then just copy-paste the lines of code to /config/locale/en.yml file.

Aug 22 13

Git: error: src refspec master does not match any

by tarique

I have got the following problem while I am trying this:

git init
git commit -m "Initial commit"
git remote add origin
git push -u origin master

error: src refspec master does not match any.
error: failed to push some refs to ''

Then, I tried this:
git add .
git push
No refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
fatal: The remote end hung up unexpectedly
error: failed to push some refs to ''

The reason for this error message is that I forgot to commit in the git after run git add . command.
So, it should be:

git init
git remote add origin
git add .
git commit -m "Initial commit"
git push -u origin master

Aug 16 13

ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked

by tarique

I had this issue while I was trying to insert a record into my SQLite3 database using rails console.
ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: INSERT INTO "users" ("created_at", "email", "name", "password_digest", "updated_at") VALUES (?, ?, ?, ?, ?). I tried every way around to solve this issue found in Google and I failed. All I did…just close my SQLite Database Browser and it solved my problem!!

Aug 14 13

Push Your App to Renamed Heroku App

by tarique

The command git push heroku master wont work if you rename your Heroku app from the Heroku website. You have to update the git remote for the app as following:

git remote rm heroku
git remote add heroku

Thanks to: James Ward

Source: StackOverFlow

Apr 17 13

[HOW TO] Install Oracle JDK 7 in Linux Mint/Ubuntu12.10

by tarique

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Apr 17 13

[HOW TO] Install Ruby and Rails in Linux Mint 14 Nadia/Ubuntu 12.10

by tarique

Open terminal (CTR+ALT+T) and run the following commands.

1. Sudo apt-get install git

2. sudo apt-get install curl

3. curl -L | bash -s stable --ruby

4. sudo apt-get install git-core

5. source ~/.rvm/scripts/rvm

6. bash -s stable < <(curl -s

7. rvm autolibs enable

8. rvm requirements

9. sudo apt-get install build-essential openssl libreadline6 libreadline6-dev \
curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 \
libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison \

10. rvm install ruby-2.0

11. curl -L | bash -s stable --rails

12. source /home/gazi/.rvm/scripts/rvm

Feb 23 13

[How to] Install Apache PHP MySQL and PhpMyAdmin on Ubuntu 12.10

by tarique


Open terminal (CTR+ALT+T) and type:

sudo apt-get install apache2

Open a browser and type http://localhost and you should see this:

Screenshot from 2013-02-20 11:17:35

It makes sure that the Apache server installed successfully. Next, we will install PHP.


sudo apt-get install libapache2-mod-php5 php5

This will install PHP5 with the libraries to interface with Apache. So, we need to restart Apache server.

sudo etc/init.d/apache2 restart

If you can not edit/access configuration files, then please follow the steps.

Now, create a file called test.php to test it out.

sudo nano /var/www/test.php

write phpinfo() function so we can check out our installation:


You should come up with this:

Screenshot from 2013-02-20 12:50:24


sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

MySQL will ask you for password. It is not a good practice to leave the password field as blank.
Now, we test our server to make sure it is working as expected:

mysql -u root -p

show databases;

Screenshot from 2013-02-20 12:56:12

or you can follow this tutorial.

Installing PhpMyAdmin:

Open Terminal and type the below code and hit enter.

sudo apt-get install phpmyadmin

Type y and hit enter to confirm phpMyadmin installation and you will be prompted for a webserver configuration during the installation.

Select apache2

You will be prompted for phpmyadmin configuration and you should select No

Type the following command in terminal:

sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d

Restart Apache server:

sudo /etc/init.d/apache2 restart or sudo service apache2 restart

Finally, open browser and type http://localhost/phpmyadmin/

Screenshot from 2013-02-23 15:30:40

PhpMyAdmin is by default configured as to not allow password less login. You will most likely get Login without a password is forbidden by configuration (see AllowNoPassword) error when trying to login to your passwordless account;
You have to configure file. To do that, go to: /etc/phpmyadmin/ and uncomment or add the following line, and set the the value to TRUE.

$cfg['Servers'][$i]['AllowNoPassword'] = TRUE;

If you can not edit/access configuration files, then please follow the steps.

Feb 20 13

[How To] get permissions to edit system configuration files

by tarique

Open terminal (CTR+ALT+T) and type sudoedit [file location] sudoedit /etc/phpmyadmin/ if you are using a terminal-based editor such as nano or are ssh’ing into a server.

hit ENTER and type your root password. You will see the file contents in the terminal window.

Screenshot from 2013-02-20 11:38:37

Use CTR+X after edit and type Y for confirmation. Hit ENTER to save the file.