Archive for the tag 'Ruby'

SBDavid

Installing Ruby on Centos with Yum

Installing Ruby on Centos with Yum

Ruby on Rails is an open-source web framework that’s optimizied for programmers happiness and sustainable productivity.

How to upgrade to the minimal requirement.

The below instructions are for 32-bit architecture.

#rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
#rpm -Uvh http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm
#yum install ruby ruby-shadow ruby-ri ruby-rdoc gcc gcc-c++ ruby-devel -y
#ruby -v

RubyGems

You can download and then install RubyGems from:

http://rubyforge.org/projects/rubygems/

You will see a list of all files for the project.

#wget http://rubyforge.org/frs/?group_id=126&release_id=43601
#tar xzvf rubygems-1.3.7.tgz
#cd cd rubygems-1.3.7
#sudo ruby setup.rb
#gem –version

Ruby on Rails and rubygems install on CentOS

Ruby on Rails install on CentOS

Once you have the development tools package installed. You can go ahead and install Ruby on Rails. The main ruby packages and dependencies will be installed using the ‘yum’ package manager, but rubygems will be installed from source. Rubygems is not readily available through the repositories in yum.

Install ruby.

Main Ruby on Rails packages can be installed using the below method.

sudo yum install ruby ruby-devel ruby-irb ruby-rdoc ruby-ri

Once done, we can have a look at the Ruby version.

$ ruby -v
ruby 1.8.8dev (2010-02-11) [i686-linux]

Installing rubygems for Rails installation.

Download from: http://rubyforge.org/projects/rubygems/

wget http://rubyforge.org/frs/download.php/70696/rubygems-1.3.7.tgz

Now unpack it and move into the newly created folder.

Now we can go through the simple process of compiling it:

sudo ruby setup.rb

Once done, we can check the gem version with a:

$ gem -v
1.3.7

NOTE:

http://rubygems.org is now the default source for downloading gems.

* `gem` commands
* `gem install` and `gem fetch` now report alternate platforms when a matching one couldn’t be found.

Creating a Rewrite for Ruby on Rails Application in cPanel

Ruby on Rails uses its own server, users visiting your Ruby on Rails application will need to be redirected to the appropriate port.

Because Ruby on Rails uses its own server, users visiting your website (and subsequently your Ruby on Rails application) will need to be redirected to the appropriate port.
Ruby does not respond on the standard HTTP port number, 80. Thus, visitors would need to specify the port number with the domain — for example, example.com:12001.

To configure a rewrite for Ruby on Rails Application in cPanel
1. Log into cPanel.
2. Navigate to the Software/Services section of your cPanel interface.
3. Click the Ruby on Rails icon. This step will open the Ruby on Rails management interface.
4. Click the Create Rewrite button corresponding to the appropriate application in the Create A Rewrite table.

Creating a Ruby on Rails Application in Cpanel Server

Ruby on Rails runs on its own server so the setup requires a little extra work.

1. Log into cPanel.
2. Navigate to the Software/Services section of your cPanel interface.
3. Click the Ruby on Rails icon.
* This step will open the Ruby on Rails management interface.
4. Specify your application’s name in the App Name field.
* PICK Remember: To set your application to load when the server is booted, click the Load on Boot? check box.
5. Assign the application path in the Application Path field.
* note Note: If you set an application path in your public_html/ directory, your source code and configuration files can be viewed by anyone on the web.
6. Use the Environment drop-down menu to select the type of Ruby on Rails environment you wish to run.
7. Click Create.

SBDavid

Installing Ruby on Cpanel

Installing Ruby

To begin, you will need root access to the server on which you wish to install Ruby

Requirements

cPanel version 11.

Log into your server as the root user and issue the following command via the command line:

yum list ruby

Execute the following script to install Ruby:

/scripts/installruby

After installing Ruby, you will need to make sure that the appropriate ports are opened for your cPanel users.

By default, Ruby applications begin on port 12001. Ruby application port numbers are automatically incremented with each new Ruby application.

This means the the first Ruby on Rails application created on your server will use port 12001, while the second Ruby on Rails application will use port 12002.

Next »