{"id":379,"date":"2014-05-12T08:00:00","date_gmt":"2014-05-12T07:00:00","guid":{"rendered":"http:\/\/www.diogonunes.com\/blog\/?p=379"},"modified":"2020-05-15T14:24:43","modified_gmt":"2020-05-15T13:24:43","slug":"set-up-your-rails-env","status":"publish","type":"post","link":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/","title":{"rendered":"Setting up your Rails environment from scratch"},"content":{"rendered":"<figure id=\"attachment_1373\" aria-describedby=\"caption-attachment-1373\" style=\"width: 620px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?resize=580%2C215\" alt=\"original photo: goo.gl\/QE43FV\" width=\"580\" height=\"215\" class=\"size-full wp-image-1373\" srcset=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?w=620&amp;ssl=1 620w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?resize=400%2C148&amp;ssl=1 400w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><figcaption id=\"caption-attachment-1373\" class=\"wp-caption-text\">original photo: goo.gl\/QE43FV<\/figcaption><\/figure>\n<h2>This is a complete yet summarized guide to set up a Ruby on Rails development environment on Linux.<\/h2>\n<p><!--more--><\/p>\n<p>Installing and configuring Sublime Text, Github, and Heroku are optional but we&#8217;re included for the sake of completeness. Since these are the <em>de facto<\/em> tools for editing source code, managing code repositories and deploying applications on the Rails world, you&#8217;ll probably want to install them and get used to them.<\/p>\n<p>Assuming you already have <a href=\"http:\/\/www.ubuntu.com\/download\/desktop\">Ubuntu<\/a> installed, let&#8217;s start!<\/p>\n<h2>Installing Ruby, the core language<\/h2>\n<p>Install Ruby&#8217;s dependencies first:<\/p>\n<pre><code>sudo apt-get update\nsudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev\n<\/code><\/pre>\n<p>Install <a href=\"http:\/\/rvm.io\/\">rvm<\/a> (ruby version manager), a command-line tool which allows you to easily install, manage, and work with multiple ruby environments:<\/p>\n<pre><code>sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev\ncurl -L https:\/\/get.rvm.io | bash -s stable\nsource ~\/.rvm\/scripts\/rvm\necho \"source ~\/.rvm\/scripts\/rvm\" &gt;&gt; ~\/.bashrc\nrvm get stable                                  # updates to the latest  version\n<\/code><\/pre>\n<p>Install Ruby using rvm:<\/p>\n<pre><code>rvm install 2.1.0               # installs ruby 2.1.0, it might take a while\nrvm use 2.1.0 --default\nruby -v                         # should print your ruby's version\n<\/code><\/pre>\n<p>It&#8217;s probably a good idea to install a <a href=\"https:\/\/en.wikipedia.org\/wiki\/YAML\">YAML<\/a> library, as you might need it later:<\/p>\n<pre><code>apt-get install libyaml-dev     # For Debian-based Linux systems\nyum install libyaml-devel       # For Fedora\/CentOS\/RHEL Linux systems\nbrew install libyaml            # For Mac with Homebrew\n<\/code><\/pre>\n<p>Finally tell <a href=\"http:\/\/rubygems.org\/\">RubyGems<\/a> (which was installed with Ruby and is responsible for managing gems) not to install the documentation for each package locally:<\/p>\n<pre><code>echo \"gem: --no-ri --no-rdoc\" &gt; ~\/.gemrc\n<\/code><\/pre>\n<h2>Installing Rails, the framework<\/h2>\n<p>Nowadays almost everything uses Javascript, therefore we&#8217;ll need a JS runtime. Among other things, this lets you use the Asset Pipeline in Rails which combines and minifies your .js files for a faster production environment. We&#8217;ll install Node.JS as our Javascript runtime:<\/p>\n<pre><code>sudo add-apt-repository ppa:chris-lea\/node.js\nsudo apt-get update\nsudo apt-get install nodejs\n<\/code><\/pre>\n<p>Time to lay down the <em>rails<\/em> for your <em>train<\/em> (<a href=\"http:\/\/youtu.be\/6zXDo4dL7SU\">get it?<\/a>):<\/p>\n<pre><code>gem install rails\nrails -v                    # should print your Rails version\n<\/code><\/pre>\n<h2>Installing Sublime Text, the code editor<\/h2>\n<p><a href=\"http:\/\/www.sublimetext.com\/\">Sublime Text<\/a> is a elegant, customizable, and powerful text\/code editor. Here&#8217;s <a href=\"http:\/\/blog.codeclimate.com\/blog\/2012\/06\/21\/sublime-text-2-for-ruby\/\">why you should use it<\/a>. Customizing it would need another guide, for now let&#8217;s just <a href=\"http:\/\/askubuntu.com\/a\/227617\/17727\">install it<\/a>:<\/p>\n<pre><code># For Sublime-Text-2\nsudo add-apt-repository ppa:webupd8team\/sublime-text-2\nsudo apt-get update\nsudo apt-get install sublime-text\n# For Sublime-Text-3 (beta)\nsudo add-apt-repository ppa:webupd8team\/sublime-text-3\nsudo apt-get update\nsudo apt-get install sublime-text-installer\n<\/code><\/pre>\n<h2>Configuring Git(hub), the code repository<\/h2>\n<p>When you installed Ruby&#8217;s dependencies you installed <a href=\"http:\/\/git-scm.com\/\">Git<\/a>. I strongly advise you to use Git as your version control system. If you&#8217;re planning to develop alone, you can start using Git locally right away, just execute <code>git init<\/code> on your application&#8217;s folder.<\/p>\n<p>However, if you want to push your local changes to a remote code repository or share your code online and let others fork it, you should <a href=\"https:\/\/github.com\/join\">create a free Github account<\/a>. Once you have your Github account:<\/p>\n<pre><code>git config --global color.ui true\ngit config --global core.editor \"subl -w\"               # use Sublime Text as the default code editor\ngit config --global user.name \"Alice Wonderland\"        # replace with your name\ngit config --global user.email \"alice@wonderland.com\"   # replace with your email\nssh-keygen -t rsa -C \"alice@wonderland.com\"    \n<\/code><\/pre>\n<p>The last command will generate a public and a private SSH key. This keys are used to authenticate you before you push changes to the online repository. You&#8217;ll get something like this:<\/p>\n<pre><code>Generating public\/private rsa key pair.\nEnter file in which to save the key (\/home\/alice\/.ssh\/id_rsa):       # press enter to use default location\nCreated directory '\/home\/alice\/.ssh'.\nEnter passphrase (empty for no passphrase):                          # optional, encrypts your private key \nYour identification has been saved in \/home\/alice\/.ssh\/id_rsa.       # private key, DO NOT share it\nYour public key has been saved in \/home\/alice\/.ssh\/id_rsa.pub.       # public key, you need to send this to github\n<\/code><\/pre>\n<p>To copy the public key, open it on a text editor, and copy the file&#8217;s contents:<\/p>\n<pre><code>gedit \/home\/alice\/.ssh\/id_rsa.pub\n<\/code><\/pre>\n<p>Go to your <a href=\"https:\/\/help.github.com\/articles\/generating-ssh-keys#step-3-add-your-ssh-key-to-github\">Github&#8217;s Account Settings > SSH keys > Add SSH keys<\/a>. Give it any title and paste the copied public key.<\/p>\n<h2>Configuring the database<\/h2>\n<p>Rails ships with sqlite3 as the default database. Chances are you won&#8217;t want to use it because it&#8217;s stored as a simple file on disk. You&#8217;ll probably want something more robust like <a href=\"http:\/\/www.mysql.com\/\">MySQL<\/a> (Rails&#8217; default) or <a href=\"http:\/\/www.postgresql.org\/\">PostgreSQL<\/a> (Heroku&#8217;s default) or both!<\/p>\n<p>I use MySQL for development and testing and PostgreSQL for production. Since Rails is database agnostic, as long as you correctly configure your databases (<code>databases.yml<\/code> file) everything will work just fine.<\/p>\n<h3>PostgreSQL<\/h3>\n<p>The PostgreSQL installation doesn&#8217;t setup a user for you, so you&#8217;ll have to do it manually after you install it:<\/p>\n<pre><code>sudo sh -c \"echo 'deb http:\/\/apt.postgresql.org\/pub\/repos\/apt\/ precise-pgdg main' &gt; \/etc\/apt\/sources.list.d\/pgdg.list\"\nwget --quiet -O - http:\/\/apt.postgresql.org\/pub\/repos\/apt\/ACCC4CF8.asc | sudo apt-key add -\nsudo apt-get update\nsudo apt-get install postgresql-common\nsudo apt-get install postgresql-9.3 libpq-dev   # installs postgresql version 9.3\n<\/code><\/pre>\n<p>Let&#8217;s create a user with permissions to create databases. Attention: the name of the postgres user should be the name of the user currently logged in on your operating system &#8211; therefore you will praobably create a user called <code>john<\/code> instead of the usual <code>admin<\/code> or <code>sa<\/code>.<\/p>\n<pre><code>sudo -u postgres createuser alice -s    # the currently logged user's name\n<\/code><\/pre>\n<p>Now for the password:<\/p>\n<pre><code>sudo -u postgres psql           # start postgres\n\\password alice                 # tell it you want to change your password\nEnter new password:             # do it \n\\q                              # quit when you're done\n<\/code><\/pre>\n<p>Later on, after Rails creates your application you should configure the <code>database.yml<\/code> file with the user and password you just created on the previous step.<\/p>\n<h2>Installing Heroku, the production environment<\/h2>\n<p>Once you have your application working locally you&#8217;ll want to deploy it online so that user can&#8230; well, use it! <a href=\"https:\/\/www.heroku.com\/\">Heroku<\/a> integrates really well with Rails and its free. So <a href=\"https:\/\/id.heroku.com\/signup\">sign up<\/a> and <a href=\"https:\/\/toolbelt.heroku.com\/debian\">install Heroku&#8217;s toolbelt<\/a>:<\/p>\n<pre><code>wget -qO- https:\/\/toolbelt.heroku.com\/install-ubuntu.sh | sh    # Debian or Ubuntu\nheroku login                                                    # type in your credentials\nheroku keys:add                                                 # this will associate your github's SSH keys with heroku\n<\/code><\/pre>\n<h2>Done&#8230; but is it working?<\/h2>\n<p>To test your Ruby\/Rails installation:<\/p>\n<pre><code>rails new myapp\n\n#### If you want to use MySQL\nrails new myapp -d mysql\n\n#### If you want to use Postgres\n# Note that this will expect a postgres user with the same username\n# as your app. You should edit the file at myapp\/config\/database.yml\n# to match the user you created earlier\nrails new myapp -d postgresql\n\n# Move into the application directory\ncd myapp\n\n# If you setup MySQL or Postgres with a username\/password, modify the\n# config\/database.yml file to contain the username\/password that you specified    \n\nrake db:create  # Create the database    \nrails server    # And open your browser at the url output by this command\n<\/code><\/pre>\n<p>This tutorial was based on <a href=\"http:\/\/gorails.com\/setup\/ubuntu\/13.10\">GoRails&#8217;<\/a>. To test the whole development workflow (from zero to deploy) follow <a href=\"https:\/\/www.railstutorial.org\/\">Michael Hartl&#8217;s Rails Tutorial<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a complete yet summarized guide to set up a Ruby on Rails development environment on Linux.<\/p>\n","protected":false},"author":1,"featured_media":1373,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[29,30,31,48],"class_list":["post-379","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-coding","tag-ruby-on-rails","tag-tutorial","tag-web-dev"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Setting up your Rails environment from scratch - The Geeky Gecko<\/title>\n<meta name=\"description\" content=\"This is a complete and summarized guide to set up a Ruby on Rails development environment on Ubuntu.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setting up your Rails environment from scratch - The Geeky Gecko\" \/>\n<meta property=\"og:description\" content=\"This is a complete and summarized guide to set up a Ruby on Rails development environment on Ubuntu.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/\" \/>\n<meta property=\"og:site_name\" content=\"The Geeky Gecko\" \/>\n<meta property=\"article:published_time\" content=\"2014-05-12T07:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-15T13:24:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?fit=620%2C230&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"620\" \/>\n\t<meta property=\"og:image:height\" content=\"230\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Diogo Nunes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dialexnunes\" \/>\n<meta name=\"twitter:site\" content=\"@dialexnunes\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Diogo Nunes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/\"},\"author\":{\"name\":\"Diogo Nunes\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"headline\":\"Setting up your Rails environment from scratch\",\"datePublished\":\"2014-05-12T07:00:00+00:00\",\"dateModified\":\"2020-05-15T13:24:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/\"},\"wordCount\":679,\"publisher\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"image\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?fit=620%2C230&ssl=1\",\"keywords\":[\"coding\",\"rails\",\"tutorial\",\"web dev\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/\",\"url\":\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/\",\"name\":\"Setting up your Rails environment from scratch - The Geeky Gecko\",\"isPartOf\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?fit=620%2C230&ssl=1\",\"datePublished\":\"2014-05-12T07:00:00+00:00\",\"dateModified\":\"2020-05-15T13:24:43+00:00\",\"description\":\"This is a complete and summarized guide to set up a Ruby on Rails development environment on Ubuntu.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?fit=620%2C230&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?fit=620%2C230&ssl=1\",\"width\":620,\"height\":230,\"caption\":\"original photo: goo.gl\/QE43FV\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.diogonunes.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setting up your Rails environment from scratch\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#website\",\"url\":\"https:\/\/www.diogonunes.com\/blog\/\",\"name\":\"The Geeky Gecko\",\"description\":\"The Geeky Gecko\",\"publisher\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.diogonunes.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\",\"name\":\"Diogo Nunes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1\",\"width\":799,\"height\":799,\"caption\":\"Diogo Nunes\"},\"logo\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.diogonunes.com\",\"https:\/\/x.com\/dialexnunes\"],\"url\":\"https:\/\/www.diogonunes.com\/blog\/author\/diogo-nunes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setting up your Rails environment from scratch - The Geeky Gecko","description":"This is a complete and summarized guide to set up a Ruby on Rails development environment on Ubuntu.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/","og_locale":"en_US","og_type":"article","og_title":"Setting up your Rails environment from scratch - The Geeky Gecko","og_description":"This is a complete and summarized guide to set up a Ruby on Rails development environment on Ubuntu.","og_url":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/","og_site_name":"The Geeky Gecko","article_published_time":"2014-05-12T07:00:00+00:00","article_modified_time":"2020-05-15T13:24:43+00:00","og_image":[{"width":620,"height":230,"url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?fit=620%2C230&ssl=1","type":"image\/jpeg"}],"author":"Diogo Nunes","twitter_card":"summary_large_image","twitter_creator":"@dialexnunes","twitter_site":"@dialexnunes","twitter_misc":{"Written by":"Diogo Nunes","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#article","isPartOf":{"@id":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/"},"author":{"name":"Diogo Nunes","@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"headline":"Setting up your Rails environment from scratch","datePublished":"2014-05-12T07:00:00+00:00","dateModified":"2020-05-15T13:24:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/"},"wordCount":679,"publisher":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"image":{"@id":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?fit=620%2C230&ssl=1","keywords":["coding","rails","tutorial","web dev"],"articleSection":["Technology"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/","url":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/","name":"Setting up your Rails environment from scratch - The Geeky Gecko","isPartOf":{"@id":"https:\/\/www.diogonunes.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#primaryimage"},"image":{"@id":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?fit=620%2C230&ssl=1","datePublished":"2014-05-12T07:00:00+00:00","dateModified":"2020-05-15T13:24:43+00:00","description":"This is a complete and summarized guide to set up a Ruby on Rails development environment on Ubuntu.","breadcrumb":{"@id":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#primaryimage","url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?fit=620%2C230&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?fit=620%2C230&ssl=1","width":620,"height":230,"caption":"original photo: goo.gl\/QE43FV"},{"@type":"BreadcrumbList","@id":"https:\/\/www.diogonunes.com\/blog\/set-up-your-rails-env\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.diogonunes.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Setting up your Rails environment from scratch"}]},{"@type":"WebSite","@id":"https:\/\/www.diogonunes.com\/blog\/#website","url":"https:\/\/www.diogonunes.com\/blog\/","name":"The Geeky Gecko","description":"The Geeky Gecko","publisher":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.diogonunes.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c","name":"Diogo Nunes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1","width":799,"height":799,"caption":"Diogo Nunes"},"logo":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.diogonunes.com","https:\/\/x.com\/dialexnunes"],"url":"https:\/\/www.diogonunes.com\/blog\/author\/diogo-nunes\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/rails-worker-assembly-construction.jpg?fit=620%2C230&ssl=1","jetpack-related-posts":[{"id":3029,"url":"https:\/\/www.diogonunes.com\/blog\/phantomdriver-headless-chrome-driver-jenkins\/","url_meta":{"origin":379,"position":0},"title":"Move from PhantomDriver to headless ChromeDriver on Jenkins","author":"Diogo Nunes","date":"3 July, 2017","format":false,"excerpt":"I had to make that joke \u261d\ufe0f UPDATE: The initial goal of this post was to guide you through the configuration of the headless Chrome (Driver) on Jenkins. However, in the meantime this happened: the maintainer of PhantomJS is stepping down because headless Chrome is coming Chrome is faster and\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2017\/04\/ghostbuster-logo.jpg?fit=1200%2C1037&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2017\/04\/ghostbuster-logo.jpg?fit=1200%2C1037&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2017\/04\/ghostbuster-logo.jpg?fit=1200%2C1037&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2017\/04\/ghostbuster-logo.jpg?fit=1200%2C1037&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2017\/04\/ghostbuster-logo.jpg?fit=1200%2C1037&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":825,"url":"https:\/\/www.diogonunes.com\/blog\/bootstrap-switch-on-rails\/","url_meta":{"origin":379,"position":1},"title":"Using Bootstrap Switch 3 on Rails","author":"Diogo Nunes","date":"9 June, 2014","format":false,"excerpt":"Replace Bootstrap's checkboxes and radio buttons by an elegant switch... a Bootstrap Switch. I'm a great fan of Twitter's Bootstrap. Recently I had to develop a settings page which involved displaying a lot of Yes\/No checkboxes. It looked outdated. I wanted something a bit more \"app-like\" - a Yes\/No switch.\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/06\/bootstrap-switch-3-demo-examples.png?fit=564%2C430&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/06\/bootstrap-switch-3-demo-examples.png?fit=564%2C430&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/06\/bootstrap-switch-3-demo-examples.png?fit=564%2C430&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":671,"url":"https:\/\/www.diogonunes.com\/blog\/rails-vs-django-vs-play-frameworks\/","url_meta":{"origin":379,"position":2},"title":"Rails vs Django vs Play: Battle of frameworks","author":"Diogo Nunes","date":"26 May, 2014","format":false,"excerpt":"This post is a review of those three frameworks considering four criteria: Ease of learning, Speed of development, Tools\/Plugins, and Community. Right from the start I banished PHP from my possible choices. I know that \"sufficiently talented coders can write great applications in terrible languages\" (Jeff Atwood), but I just\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/09\/rails-vs-django-vs-play.jpg?fit=946%2C550&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/09\/rails-vs-django-vs-play.jpg?fit=946%2C550&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/09\/rails-vs-django-vs-play.jpg?fit=946%2C550&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/09\/rails-vs-django-vs-play.jpg?fit=946%2C550&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":665,"url":"https:\/\/www.diogonunes.com\/blog\/ruby-on-rails-an-overview-on-why-its-so-good\/","url_meta":{"origin":379,"position":3},"title":"Ruby on Rails: an overview on why it&#8217;s so good","author":"Diogo Nunes","date":"5 May, 2014","format":false,"excerpt":"I was in denial for a while but now I get why Rails is so good. First things first, what is Rails anyway? Ruby on Rails is a framework that allows you to develop web applications using the MVC design pattern. Generally speaking a framework is a higher-level abstraction that\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"www.tryruby.org","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/05\/try-ruby-e1373488411601.jpg?fit=500%2C375&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1481,"url":"https:\/\/www.diogonunes.com\/blog\/custom-domain-for-rails-application-at-heroku\/","url_meta":{"origin":379,"position":4},"title":"Using a custom domain for your (Rails) application at Heroku","author":"Diogo Nunes","date":"3 November, 2014","format":false,"excerpt":"Because no one will remember gentle-tundra-5348.herokuapp.com If you deployed your Rails application to heroku for free, you probably ended up with an URL like http:\/\/weird-name-1234.herokuapp.com\/. You can rename that URL to something more familiar, but it will always be of the form *.heroku.com. That's fine when your just testing or\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"original photo: http:\/\/goo.gl\/dxaV95","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/Heroku-Rails-Station.jpg?fit=600%2C400&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/Heroku-Rails-Station.jpg?fit=600%2C400&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/11\/Heroku-Rails-Station.jpg?fit=600%2C400&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":4698,"url":"https:\/\/www.diogonunes.com\/blog\/framework-review-maestro\/","url_meta":{"origin":379,"position":5},"title":"Framework review: Maestro","author":"Diogo Nunes","date":"15 May, 2023","format":false,"excerpt":"\ud83c\udfc6 This post was featured in Software Testing Weekly #169 A friend (Hugo) told me about this new mobile test automation framework called Maestro. At the time, my team was using Appium to test a React Native app, that ran on iOS and Android. I was not 100% happy with\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2023\/04\/ConductorEimearNoonepoisedtomakehistoryatthe2020Oscars.jpg?fit=1000%2C563&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2023\/04\/ConductorEimearNoonepoisedtomakehistoryatthe2020Oscars.jpg?fit=1000%2C563&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2023\/04\/ConductorEimearNoonepoisedtomakehistoryatthe2020Oscars.jpg?fit=1000%2C563&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2023\/04\/ConductorEimearNoonepoisedtomakehistoryatthe2020Oscars.jpg?fit=1000%2C563&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/comments?post=379"}],"version-history":[{"count":1,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/379\/revisions"}],"predecessor-version":[{"id":3837,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/379\/revisions\/3837"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/media\/1373"}],"wp:attachment":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/media?parent=379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/categories?post=379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/tags?post=379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}