Setting the permissions for Webserver

Sometimes when i deploy via tools like ruby’s capistrano, there is a certain tendency to get permissions brutally wrong.

and also very easy to encounter the 403 forbidden error “you don’t have permission to access on this server”

For apache to render web files, it require read permissions.

I ran into this and used this commands to resolve the matter: :P

sudo chmod -R a+rx ~/public_html # this is the web site folder
sudo chmod a+rx ~ # this is current or deployment user home directory

the first ensures that public_html directory is readable and accessible to all users on the system.

The next command sets current or deployment user’s home directory to be readable and accessible to all.

If you add more directories for additional virtual domains later, run that first command again to make sure the new directories are accessible as well.

Guide to Setup Ruby On Rails in an Ubuntu Server

Find attached a very imperative guide to setting up ruby on rails Ubuntu. Click the link below.

I found it very useful. :)
Installation_Ruby-on-Rails_for_Ubuntu-Linux-Mint_www-mirceagoia-com

However, with Ubuntu you may encounter this problem “no such file to load — openssl (LoadError)”.
With rvm the solution is as follows:

sudo apt-get install libssl-dev
cd ~/.rvm/src/ruby-1.8.7/ext/openssl
ruby extconf.rb
make && make install

Also you may encounter errors connected with the readline extension.
Roll up you sleeve and do :) :
sudo apt-get install libreadline5-dev
cd ~/.rvm/src/ruby-1.8.7/ext/readline
ruby extconf.rb
make && make install