TOP 10 Ruby on Rails (RoR) books all RoR developers must read.

1. Agile Web Development with Rails 4

2. Learn Ruby the Hard Way

3. Refactoring Ruby Edition

4. Everyday Rails Testing with RSpec

5. Confident Ruby

6. The Ruby Programming Language: Everything You Need to Know

7. The Well-Grounded Rubyist

8. Ruby on Rails Tutorial

9. Programming Ruby – The Pragmatic Programmer?s Guide

10. Rails 4 in Action: Revised Edition of Rails 3 in Action

Be Sociable, Share!

Upgrading Nginx to the latest version on Ubuntu servers

Writing this post after a long long time almost a gap of around 1+ year.

Nginx – I have been a big fan of nginx since the time I came to know about it. Have written many blogs about the same in the past. Most of the apps deployed by me are on Nginx.

Its always good to have nginx upgraded to the latest version. Below are the steps for the same

First of all check the existing version of nginx using

nginx -v

Now take the back of the existing nginx

sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.1.1.19.backup

Now Stop the service

sudo service nginx stop or /etc/init.d/nginx stop

Install dependencies (might not be required)

sudo aptitude install python-software-properties

Add the repository for the stable version of Nginx

sudo add-apt-repository ppa:nginx/stable

Now update and upgrade

sudo aptitude update
sudo aptitude safe-upgrade

Once done. start nginx

sudo service nginx restart or /etc/init.d/nginx start

Again check the version (For confirmation)

nginx -v

Voila!! its done. Njoy safe and secure web apps.

Please post your comments in case you face any issues in upgrading nginx.

Be Sociable, Share!

Install / Upgrade to OpenSSH 6.6p on Ubuntu 12.04 and 13.10

Hey all,

Had to upgrade OpenSSH to 6.6p for PCI Compliance. Found that 12.04 does not support OpenSSH 6.6p via direct upgrade. So Had to do it manually. After some research found that it can be done easily with 3-4 steps

1) Download portable version of OpenSSH from

wget http://mirror.aarnet.edu.au/pub/OpenBSD/OpenSSH/portable/openssh-6.6p1.tar.gz

2) Run the following command

tar -xvf openssh-6.6p1.tar.gz
cd openssh-6.6p1
./configure –prefix=/usr –sysconfdir=/etc/ssh \
–with-md5-passwords –with-privsep-path=/var/lib/sshd

3) make install

4) Check Version using

sshd -V

you should see it as OpenSSH_6.6p1

If you do not see it restart your sshd service and check again.

Do comment for any questions.

Njoi

Be Sociable, Share!

Solve vulnerability in OpenSSL 1.0.1 Upgrade OpenSSL on Ubuntu

The OpenSSL project has recently announced a security vulnerability in OpenSSL affecting versions 1.0.1 and 1.0.2 (CVE-2014-0160).

Users who are using Ubuntu specifically 12.04 LTS and having openssl version 1.0.1 needs to upgrade to 1.0.1g

First of all find out how to see if your website is vulnerable or not.

Go to http://filippo.io/Heartbleed/ type in your domain and see the result.

If you see that your website is Vulnerable check the Open ssl version using the command below

openssl version -v

IF it is 1.0.1 or 1.0.1a….f You need to upgrade it to 1.0.1g

Below the single command line to compiling and install the last openssl version.

curl https://www.openssl.org/source/openssl-1.0.1g.tar.gz | tar xz && cd openssl-1.0.1g && sudo ./config && sudo make && sudo make install

Replace old openssl binary file by the new one via a symlink.

sudo ln -sf /usr/local/ssl/bin/openssl `which openssl`

Thats all

Now run the command to check the version again and you will see the new version of openssl

OpenSSL 1.0.1g

Hope this helps. If you face any issue please feel free to comment.

Be Sociable, Share!

Install DevKit on Windows 7 (64-bit)

Hey all

Finally got some time to update the blog. Recently I was configuring a rails app on windows 7 machine (ah! I know now no one uses windows for development but it was a requirement šŸ™ ) and I had to install json gem.

As soon as I did gem install json I got a weird error.

ERROR: Error installing json:
The ‘json’ native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit from ‘http://rubyinstaller.org/downloads’ and follow the instructions at ‘http://github.com/oneclick/rubyinstaller/wiki/Development-Kit’

Then I went and downloaded DevKit-4.5.0-20100819-1536-sfx.exe. Extracted it to C:\DevKit. And then from the command prompt I executed the following commands.

ruby dk.rb init

The command above will create a config.yml file where you need to verify where you ruby is installed and set it accordingly if there is any change.

ruby dk.rb review

The command above will show you the path where its pointing to.

ruby dk.rb install

The command above will install devkit.

Thats all!! Now again try gem install json and woo it works!!

Hope this helps.

Thanks

Be Sociable, Share!

Solve uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) in Rails 2.3.8

Hi all

If you get stuck with this strange error of uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) don’t worry.

Just follow the steps below :-

gem update –system 1.5.3

once its installed successfully do gem list and see if you have any other versions of rubygems-update already installed. If so remove all the others apart from 1.5.3

Once you do that run the following command

update_rubygems

The above command will show that 1.5.3 is installed. Do confirm the same by checking the gem version gem -v

Hope this helps. In case you have any query related to this do post a comment and I will get back ASAP

Njoi

Be Sociable, Share!
1 2 3 4 27