• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Install RVM on Rackspace Cloud Server (Ubuntu, PVHVM)

By Abhishek Ghosh October 22, 2014 9:51 am Updated on October 22, 2014

Install RVM on Rackspace Cloud Server (Ubuntu, PVHVM)

Advertisement

Here is a step by step guide for the beginners on how to install RVM on Rackspace Cloud Server running Ubuntu 14.04, PVHVM version for Rails. Ruby is an elegant object-oriented, general-purpose programming language. Ruby has influence of Perl and Lisp – that is about usage of Ruby though.

 

This Guide To Install RVM on Rackspace Cloud Server is Not For Devops Account

 

Rackspace Support can install Ruby for all kind of accounts except the Infrastructure managed level. This guide is not intended to mess up your existing managed setup. For the Infrastructure managed level users, the whole server image will be available as premium download from our Premium Membership area along with Video Guide. This is the mother text guide which practically not require to purchase server image unless you need rapid multiple deployments.

You should have a fresh device – spin up a new server instance with current Performance 1 flavor with PVHVMfeature.

Advertisement

---

Install RVM on Rackspace Cloud Server (Ubuntu, PVHVM)

 

Install RVM on Rackspace Cloud Server (Ubuntu, PVHVM)

 

As usually, login to your device (=new server) as root; update and upgrade your device :

Your Location Will Be /root
Vim
1
2
3
ssh root@IPaddress
apt-get update -y && apt-get upgrade
# take decision judiciously for upgrade prompt

As Ruby on Rails does not come as a usable package, we usually use version managers like the Ruby Version Manager ( RVM ). This is true for all Unix like OS.

But you should always check whether Ruby is installed or not by running which ruby command. If Ruby is not installed, you will not get any output. First we need to install the dependencies :

/root
Vim
1
2
3
apt-get install curl git-core ruby
# read documentation here
# https://github.com/wayneeseguin/rvm

Actually if you run this command :

Vim
1
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )

The bash script will do the major work. Find .bashrc file by running locate .bashrc command an edit it with nano. You need to edit the .bashrc file :

.bashrc
Vim
1
2
3
4
5
6
7
8
# use ^ + W to find the following :
[ -z "$PS1" ] && return
# and replace it with
if [[ -n "$PS1" ]]; then
# go to the end of file and add this
if [[ -s $HOME/.rvm/scripts/rvm ]] ; then source $HOME/.rvm/scripts/rvm ; fi
fi
# write out with ^ + O and exit with ^ + X

Run the following commands :

/root
Vim
1
2
3
4
5
6
7
8
9
10
11
12
# load .bashsrc to current environment
source ~/.bashrc
# get a list of what to install
rvm notes
# you'll get a huge output like sudo aptitude install build-essential bison openssl
# copy and paste and hit Enter / Return key
# on post installation, run
rvm list known
# you will get a list of versions
# you might need a specific version
rvm install <ver-number>-head
rvm --default <ver-number>-head

 

Shortcut to Install RVM for Ordinary Usage

 

While the above is precise, this method can give satisfactory result :

/root
Vim
1
2
3
4
\curl -sSL https://get.rvm.io | bash -s stable --rails
source ~/.rvm/scripts/rvm
rvm install <ver-number>
rvm use <ver-number>

 

Adding Nginx, Passenger and an application server

 

We can install in this way :

/root
Vim
1
2
3
4
5
6
7
# install the dependencies
# do not blindly copy
# install what you'll need
# we have libsqlite3-dev and nodejs for example
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl git-core python-software-properties libxslt1-dev libxml2-dev libmysqlclient-dev libsqlite3-dev nodejs
gem install passenger
passenger-install-nginx-module

Here is a script :

Vim
1
https://gist.githubusercontent.com/AbhishekGhosh/afa3bacf2124e803bf73/raw/9b737a42e950581f16ed3074c69f5bcb920f24cb/nginx-ruby-controller-bash-script.sh

You can work with it :

/root
Vim
1
2
3
4
5
6
7
wget -O init-deb.sh https://gist.githubusercontent.com/AbhishekGhosh/afa3bacf2124e803bf73/raw/9b737a42e950581f16ed3074c69f5bcb920f24cb/nginx-ruby-controller-bash-script.sh
# move it
mv init-deb.sh /etc/init.d/nginx
# make it executable
chmod +x /etc/init.d/nginx
# apply it
/usr/sbin/update-rc.d -f nginx defaults

Our config file will be here :

/opt/nginx/conf/nginx.conf
Vim
1
2
3
4
locate nginx.conf
# copy the output to crosscheck
nano /opt/nginx/conf/nginx.conf
# edit normally

Database part is easy :

/root
Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
apt-get install mysql-server mysql-client libmysqlclient-dev
# mysql database creation, adding user etc
mysql -u root
# mysql >
# is omitted
CREATE DATABASE your-database;
CREATE USER 'user-name'@'localhost' IDENTIFIED BY 'your-password';
# may be?
GRANT SELECT,DELETE,INSERT,UPDATE ON .* TO 'user-name'@'localhost';
# example with service net
GRANT ALL PRIVILEGES ON .* TO 'user-name'@'60.669.769.69';
FLUSH PRIVILEGES;
exit

Final work is to deploy Rails.

Tagged With ruby
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Install RVM on Rackspace Cloud Server (Ubuntu, PVHVM)

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress & PHP : Different AdSense Units on Mobile Devices

    Here is How To Serve Different AdSense Units on Mobile Devices on WordPress With PHP. WordPress Has Function Which Can Be Used In Free Way.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

  • Steps To Install Nginx Plus on Ubuntu Server (HP Cloud)

    Here Are the Steps To Install Nginx Plus on Ubuntu Server Running on HP Cloud. Nginx Plus is the Paid Version of Nginx with Extra Features.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy