Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ziaulrehman40/16445c56e3f7bc7d1dece245fb61cf8e to your computer and use it in GitHub Desktop.
Save ziaulrehman40/16445c56e3f7bc7d1dece245fb61cf8e to your computer and use it in GitHub Desktop.
This document outlines the standard development environment in devsinc

1- IDE

We generally don't use cloud9/rubymine or any other special IDE for development(you can opt for any IDE, 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 such IDEs). You are encouraged to use sublime of VSCode(see below for both).

Sublime:

Use sublime 4, install it(google or use this link for ubuntu) Here I will outline some basic configuration for sublime3 we usually use.

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

    "draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_size": 12,
"indent_using_spaces": true,
"index_files": true,
"line_padding_bottom": 2,
"line_padding_top": 0,
"rulers":
[
	90,
	100,
	120
],
"show_sidebar_on_save": false,
"spell_check": true,
"tab_size": 2,
"tab_width": 2,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"word_wrap": false

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. Useful sublime packages

VSCode:

You can use VScode as well, 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,

Add these settings in user settings.

Some recommended extension for VScode are:

castwide.solargraph
dbaeumer.vscode-eslint
donjayamanne.githistory
eamodio.gitlens
HookyQR.beautify
IBM.output-colorizer
mhutchie.git-graph
misogi.ruby-rubocop
rebornix.ruby
wheredoesyourmindgo.gruvbox-concoctis
wingrunr21.vscode-ruby

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

2- Ruby Environment/version manager

We use RVM for ruby version management, don't install rbenv because there won't be any support from seniors for that. Both serve same purpose in their own way. RVM is a de-facto standard here. You may follow these commands for installing rvm(this will come again later, so you can skip it for now, just remember we will use rvm not rbenv): RVM installation instructions

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.

This link! can be used to configure a fresh ubuntu/debian installation for rails development.(including rvm) It is tested many times but still keep an eye for anyabnormalities/errors and in addition to fixing them report them so this guide can get updated for future.

For beginners, you can skip lines first section and last section. And remember this link is not supposed to be a perfect guide, it is just to help you guys out in initial setup.

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.

Good Luck!

@umar-dev4973
Copy link

Add these settings in user settings.

this link from above document , showing page does not exist

@AliatDevsinc
Copy link

.

this link isnt working either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment