Tuesday, December 31, 2013

Installing Rails 4 on Linux Ubuntu Server 12.04

Step 1: Install RVM


Before you install ruby, you need to install a few libraries by the components you are installing, enter the following command.
sudo apt-get install build-essential curl
\curl -L https://get.rvm.io | bash -s stable
after it installing is done, close your terminal and start new one to begin
check the 'rvm' command shell
rvm
in order to work, RVM has some of its own dependancies that need to be installed. To automatically install them:
rvm requirements

Step 2: Install Ruby


rvm install ruby
we need the system using the ruby current installed
rvm use ruby --default

Step 3: Install RubyGems


rvm rubygems current

Step 4: Install Rails


gem install rails

Installing MySQL on Linux Ubuntu Server 12.04 LTS

Firsly, we are must check the current version
Just simple way to check the current installed the Database.
mysql
Next, we'll install the package MySQL
sudo apt-get install mysql-server mysql-client
That's all, now you can check the MySQL was installed on your mechine
mysql --version
Next time you able to restart your db, here we go
sudo /etc/init.d/mysql restart

Thursday, December 19, 2013

Using pattern REGEXP for detecting number in the end of the string

The sample code:
SELECT * FROM table WHERE column REGEXP '[0-9]$'