Showing posts with label RubyGems. Show all posts
Showing posts with label RubyGems. Show all posts

Monday, May 7, 2012

Install & setup Passenger module on Apache2 - Ubuntu 11.10

This guide help you to deploy Rails 3 application on apache2.

1. Install passenger gem on you're machine
$ sudo gem install passenger

2. Install apache2 module for passenger
$ sudo passenger-install-apache2-module

It does following three steps

a. The Apache 2 module will be installed for you.

If any software not available on you're server to install apache 2 module. It will guide you about missing software and some suggestion how to install those missed software

Once all support software available, then it compile & install apache 2 module.

b. Guide you how to configure apache

Once apache2 module installed, it guide you to configure apache - display LoadModule, RailsSpawnServer and RailsRuby location which will be required to configure passenger module on apache(httpd.conf).Just copy and paste those lines to httpd.conf

c. Guide you how to deploy a Ruby on Rails application
<VirtualHost *:80>

ServerName www.yourhost.com

DocumentRoot /somewhere/public

</VirtualHost>

add this virtualhost configuration on httpd.conf file

Now i hope you're apache2 server ready to deploy rails 3 application. it use passenger module for apache2.

Tuesday, September 6, 2011

Issues - Capistrano::ConnectionErr

$ cap deploy   * executing `deploy'
  * executing `deploy:update'
 ...........
** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: example.com (Net::SSH::HostKeyMismatch: fingerprint xx:xx:xx:xx:xx:xx:xx:xx:xx does not match for "example.com")
connection failed for: example.com (Net::SSH::HostKeyMismatch: fingerprint xx:xx:xx:xx:xx:xx:xx:xx:xx does not match for "example.com")

To fix this issue go to known_hosts file of the user. Example /home/deployer/.ssh/known_hosts and remove the domain specific entry. In this case domain is "example.com".

Domain specific entry would be like this - example.com ssh-rsa BBBAE5Uz

Hope this may help you

Wednesday, March 23, 2011

Tech tips - Install Ruby and RubyGems

Here is one of the simple steps to install ruby and RubyGems on Ubuntu 10.x


1. Run this command on terminal

$sudo apt-get install ruby1.9.1-full

2. Download the latest RubyGems from here

https://rubygems.org/pages/download

3. Unpack into a directory and cd here

4. Run this command (you may need admin/root privilege)

ruby setup.rb

Check the ruby, Gem version and environment settings

$ruby -v && gem -v && gem env

That's it. Hope it may help you