Could not find gem rack locally or in a repository

I was trying to install Ruby on Rails Gem and it is failed with error of “could not find gem rack locally or in a repository”.

[email protected] [~]# gem install rack
ERROR:  could not find gem rack locally or in a repository

I did try to overcome the issue and found out there are two solutions for it.

Solution 1:
Change the gem source.

To show the gem source installed in the server,
[email protected] [~]# gem source

1. Change the gem source to allow
[email protected] [~]# gem sources -a added to sources

2. Check the gem source again and it is added.
3. Install your gem again.
[email protected] [~]# gem install rack

Solution 2:
Download the Gem source to your server and install it locally and let say I am referring to rack gems.

Download the source file from URL below.

[email protected] [~]# wget
[email protected] [~]# tar zxf rack-1.2.0.tar.gz
[email protected] [~]# gem install rack


Ten Linux Command that you should know

If you are the Linux server administrator, you should know some major command from Linux.

Today, Mick Genie will show you some command that normally used by the Administrator.

1. wget – Retrieving a Software Package.
– wget is the most command use command to retrieve or get a software package or download tool from Linux Command, you can easily get the package downloaded through wget command.

Eg. wget

2. top – Monitoring Server Processes.
– With a top command, you could easily understand the server processes and it’s performance as it collected almost all of the information from the server processes.

3. tail – Reviewing Log File.
– When you checking the server log, you might want to get the real-time log information instead of open all of the file as sometimes it is large enough to and waste your memory and time to open the file. Using tail command could allow you check real-time log information.

Eg. tail -f /var/log/messages

Continue reading Ten Linux Command that you should know

How to create archives and compress file in Linux

With Linux default environment, tar is come by default and you may easily archives and compress a file or folder easily by using tar command.

If you familiar with Linux, you should know that file could be archives to .tar, .tar.gz, .tgz, .bz2, .tgz, etc, but do you know how to archives it and how to remember and understand it? It is pretty easy, actually.

To archives each of the folder/file, you may refer to the step as below.

.tar -> tar -cf file.tar folder/ # c indicate that you are creating a file and f is use to force create the inheritance file from the folder.
.tar.gz -> tar -zcf file.tar.gz folder/ # z indicate that you are using .tar.gz or tgz extension
.tgz -> tar -zcf file.tgz folder/
.bz2 -> tar -jcf file.bz2 folder/ # bz2 is a type of archives that using lesser space and it required option j.
.gz -> gzip file.gz folder/ # gzip use to zip and remove the original file.
.zip -> zip -r folder/ # zip is another archives type that not using tar but it is useful for Windows Operating System.

To extract the file as above, simply change all c to x.

.tar -> tar -xf file.tar
.tar.gz -> tar -zxf file.tar.gz
.tgz -> tar -zxf file.tgz
.bz2 -> tar -jxf file.bz2
.gz -> gunzip file.gz
.zip -> unzip

Suggestion steps to migrate a large site from WHM/cPanel

If you are familiar with WHM/cPanel, you sure have this problem while trying to migrate a website more than 2GB and found out the file/folder or any data not updated.

Today, Mick Genie will suggest a better way(my suggestion) to perform the migration.

But before that, please understand the command as below.

/scripts/pkgacct username

With Mick Genie’s suggestion, your site migration will down for minutes(depend on the size).

1. Go to the user root directory.

cd /home/username/

Continue reading Suggestion steps to migrate a large site from WHM/cPanel

Install RAR and Unrar in Linux

Sometimes, you might required to compress or extract .rar file from Linux box which do not come by default, however you may install it manually.

Under Debian Linux, you need to type apt-get as follows to install unrar program:

apt-get install unrar

Under Fedora core Linux then use yum command

yum install unrar

If the above method not working, you may copy the following command and paste to your console line.

cd /tmp;wget;tar zxf rarlinux-3.6.0.tar.gz;cd rar;cp rar unrar /bin