{"id":291,"date":"2013-06-28T05:40:57","date_gmt":"2013-06-28T05:40:57","guid":{"rendered":"http:\/\/blog.shineservers.com\/?p=291"},"modified":"2013-06-28T05:40:57","modified_gmt":"2013-06-28T05:40:57","slug":"installing-ruby-on-rails-on-ubuntu-12-04-lts-with-rvm","status":"publish","type":"post","link":"https:\/\/www.shineservers.com\/2013\/06\/28\/installing-ruby-on-rails-on-ubuntu-12-04-lts-with-rvm\/","title":{"rendered":"Installing Ruby on Rails on Ubuntu 12.04 LTS with RVM"},"content":{"rendered":"<h2>Step One\u2014 Install Ruby with RVM<\/h2>\n<hr \/>\n<p>Before we do anything else, we should run a quick update to make sure that all of the packages we download to our VPS are up to date:<\/p>\n<pre>sudo apt-get update<\/pre>\n<p>Once that&#8217;s done, we can start installing RVM, Ruby Version Manager. This is a great program that lets you use several versions of Ruby on one server; however, in this case, we will just use it to install the latest version of Ruby on the droplet.<\/p>\n<p>If you do not have curl on your system, you can start by installing it:<\/p>\n<pre>sudo apt-get install curl<\/pre>\n<p>To install RVM, open terminal and type in this command:<\/p>\n<pre>\\curl -L https:\/\/get.rvm.io | bash -s stable<\/pre>\n<p>After it is done installing, load RVM. You may first need to exit out of your shell session and start up a new one.<\/p>\n<pre>source ~\/.rvm\/scripts\/rvm<\/pre>\n<p>In order to work, RVM has some of its own dependancies that need to be installed. You can see what these are:<\/p>\n<pre>rvm requirements<\/pre>\n<p>In the text that RVM shows you, look for this paragraph.<\/p>\n<pre>Additional Dependencies:\n# For ruby:\napt-get --no-install-recommends install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev<\/pre>\n<p>Just follow the instructions to get your system up to date with all of the required dependancies.<\/p>\n<pre> sudo apt-get --no-install-recommends install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev<\/pre>\n<p>On occasion the zlib package may be reported as missing. The RVM page describes the issue and the solution in greater detail\u00a0<a href=\"https:\/\/rvm.io\/packages\/zlib\/\">here<\/a>.<\/p>\n<h2>Step Two\u2014Install Ruby<\/h2>\n<hr \/>\n<p>Once you are using RVM, installing Ruby is easy.<\/p>\n<pre>rvm install 1.9.3<\/pre>\n<p>Ruby is now installed. However, since we accessed it through a program that has a variety of Ruby versions, we need to tell the system to use 1.9.3 by default.<\/p>\n<pre>rvm use 1.9.3 --default<\/pre>\n<p>&nbsp;<\/p>\n<h2>Step Three\u2014Install RubyGems<\/h2>\n<hr \/>\n<p>The next step makes sure that we have all the required components of Ruby on Rails. We can continue to use RVM to install gems; type this line into terminal.<\/p>\n<pre> rvm rubygems current<\/pre>\n<p>&nbsp;<\/p>\n<h2>Step Four\u2014Install Rails<\/h2>\n<hr \/>\n<p>Once everything is set up, it is time to install Rails.<\/p>\n<p>To start, open terminal and type in:<\/p>\n<pre>gem install rails<\/pre>\n<p>This process may take a while, be patient with it. Once it finishes you will have Ruby on Rails installed on your droplet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step One\u2014 Install Ruby with RVM Before we do anything else, we should run a quick update to make sure that all of the packages we download to our VPS are up to date: sudo apt-get update Once that&#8217;s done, we can start installing RVM, Ruby Version Manager. This is a great program that lets [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[60],"tags":[131],"class_list":["post-291","post","type-post","status-publish","format-standard","hentry","category-linux","tag-installing-ruby-on-rails-on-ubuntu-12-04-lts-with-rvm"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/comments?post=291"}],"version-history":[{"count":0,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/291\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/media?parent=291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/categories?post=291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/tags?post=291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}