DEV Community

Hasan Nadeem
Hasan Nadeem

Posted on

Ruby/Rails Machine Setup Guide

1- IDE

We prefer to use sublime/VS Code for development(you can opt for any IDE though, but that will mean no support from seniors for any issues relating it and that might lead to un-neccessary time waste thats why it is highly preferred to not use any other IDEs). You are encouraged to use sublime or VSCode.


Install Sublime3 (google or use this link)
Here we will outline some basic configuration for sublime3 we usually use.

i- Settings Tweaks
In sublime go to preferences->settings and place these in user settings tab along with other settings.
Don't mess with default settings tab

  "auto_complete_commit_on_tab": true,
            "characters": "b4",
            "selector": "text.html"
    "auto_indent": true,
    "caret_style": "phase",
    "color_scheme": "Packages/Color Scheme - Default/Monokai.sublime-color-scheme",
    "draw_minimap_border": true,
    "draw_white_space": "all",
    "enable_tab_scrolling": false,
    "ensure_newline_at_eof_on_save": true,
    "font_size": 15,
    "gutter": true,
    "highlight_line": true,
    "highlight_modified_tabs": true,
        "Ruby Completions",
    "line_numbers": true,
    "line_padding_top": 0,
    "mouse_wheel_switches_tabs": false,
    "overlay_scroll_bars": "enabled",
    "preview_on_click": true,
    "scroll_past_end": false,
    "show_tab_close_buttons": false,
    "tab_size": 2,
    "theme": "Adaptive.sublime-theme",
    "translate_tabs_to_spaces": true,
    "trim_automatic_white_space": true,
    "trim_trailing_white_space_on_save": true,
    "use_tab_stops": true,
    "wide_caret": true,
    "word_separators": "./\\()\"'-:,.;<>@#$%^&*|+=[]{}`",
    "indent_using_spaces": true,
    "index_files": true,
    "line_padding_bottom": 2,
    "line_padding_top": 0,
    "show_sidebar_on_save": false,
    "spell_check": true,
    "tab_width": 2,
    "word_wrap": false
Enter fullscreen mode Exit fullscreen mode

Have an eye for any redundency in settings and replace that if there is any.

This will make indentation more easy, as indentation is one of the most important things for code quality and useability.

ii- Sublime Package Control
Install package control following:
This link

After that, you can access package control in preferences and install any package you need(Like gitgutter, A file icon, beautifyruby, brackethighlighter etc).

Here is the list of some handy packages in sublime, you can install them in some spare time. Not required but helpful for development.
iii- Useful Sublime Packages:

A File Icon
All Autocomplete
Better CoffeeScript
Bootstrap 3 Autocomplete
Cucumber Step Finder
Dockerfile Syntax Highlighting
Javascript Beautify
Package Control
Ruby Hash Converter
Ruby Slim
Enter fullscreen mode Exit fullscreen mode


Download and install VSCode from here

Recommended settings for VSCode:

    "ruby.useLanguageServer": true,
    "ruby.format": "rubocop",
    "ruby.intellisense": "rubyLocate",
    "ruby.useBundler": true,
    "ruby.rubocop.useBundler": true,
    "[ruby]": {
        "editor.defaultFormatter": "misogi.ruby-rubocop"
    "editor.tabSize": 2,
    "files.insertFinalNewline": true,
    "telemetry.enableTelemetry": false,
    "window.titleBarStyle": "custom",
    "files.trimTrailingWhitespace": true,
Enter fullscreen mode Exit fullscreen mode

Add these settings in File > Preferences > Settings (open the settings in json)

Following are some recommended extension for VScode. Please run the following commands on terminal for installing the extensions:

code --install-extension castwide.solargraph
code --install-extension dbaeumer.vscode-eslint
code --install-extension donjayamanne.githistory
code --install-extension eamodio.gitlens
code --install-extension HookyQR.beautify
code --install-extension IBM.output-colorizer
code --install-extension mhutchie.git-graph
code --install-extension misogi.ruby-rubocop
code --install-extension rebornix.ruby
code --install-extension wheredoesyourmindgo.gruvbox-concoctis
code --install-extension wingrunr21.vscode-ruby
Enter fullscreen mode Exit fullscreen mode

You can install these through command line, one by one using the command: code --install-extension $EXT_NAME.

2- Ruby environment/version manager with Rails Setup

Link for Ruby/Rails/Rbenv/Postgres Setup
Note: Please do the following while going through the above article.

  1. Please install and use RBENV. Skip RVM
  2. Please install Ruby version 2.6+ / Rails version 6 / Postgres version 11
  3. Please set the Postgres username to postgres with password postgres - MUST
  4. Please skip Configuring Git

3- Database

It is preferred to use postgresql dbms for development, as it is a de-facto standard in most rails applications. Books may be using sqlite 3 but it is encouraged to use postgresql.

TIP: If you keep an eye on what these commands actually are doing, that will be beneficial for you. Like you can give 2-4 mins on reading about apt-get and what it actually does, give 2 minutes to read about sudo or any new command like curl if you don't know about it, this will help you grip ubuntu/linux quickly.


  1. For Fancy/Pretty Diff ->
  2. For common git aliases, run the following commands on terminal:
git config --global checkout
git config --global branch
git config --global commit
git config --global status
Enter fullscreen mode Exit fullscreen mode

NOTE: Some parts of this guide are extracted from

Top comments (2)

jsrn profile image

It'd be good to know why you recommend some of these settings and extensions over the alternatives.

hasannadeem profile image
Hasan Nadeem

Sure! I'll add up the missing details.