ide, terminal and scm to work with ruby on rails
DESCRIPTION
You can have basic guides to start or improve writing Ruby on Rails websites.TRANSCRIPT
![Page 1: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/1.jpg)
IDE, Terminal and SCM to work with Ruby on Rails
Henry Le
![Page 2: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/2.jpg)
1. Integrated Development Environment (IDE)
![Page 3: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/3.jpg)
1.a IDE vs Editor• IDE (integrated development environment): make software
development faster, usually provide code auto-completion; refactoring support; fast find of files, function, class; debug support; integrated build tools; source control management …
• IDE examples: Netbeans, Eclipse, Sublime, Ruby Mine, Aptana Studio…
• Text Editor: provide plain text editor, sometimes also provide syntax highlighting
• Text editor examples: notepad, gedit, TextMate, vim, …
![Page 4: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/4.jpg)
1.b What IDE is popular for RoR?
• In Ruby on Rails community, Sublime and Ruby Mine are the 2 most popular IDEs that everyone usually use in Mac OS and Linnux.
• For Windows Rubyist, they usually use Netbeans, Aptana and Sublime.
![Page 5: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/5.jpg)
Ruby Mine
![Page 6: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/6.jpg)
Netbeans
![Page 7: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/7.jpg)
Sublime
![Page 8: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/8.jpg)
1.c Sublime Packages
• Sublime Packages are the way Sublime organisation its plugins, settings.
• For RoR developer, we can add more syntax plugins to have much better code highlighting.
![Page 9: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/9.jpg)
Sublime Packages
![Page 10: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/10.jpg)
Without sass plugin
With sass plugin
![Page 11: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/11.jpg)
1.d Sublime Key Bindings and Settings
• Sublime settings store our config about writing code, page format, font type, highlight line, tab size … We can refer the Setting - Default file for the options supported.
• Sublime key binding store short cut definitions for Sublime commands. We can refer in Key Binding command for some examples to customise or add new ones.
![Page 12: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/12.jpg)
Sublime Key Bindings
![Page 13: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/13.jpg)
Sublime Settings
![Page 14: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/14.jpg)
1.e Are Sublime Settings is important?
• This is short but important!
• Why? When work in a group, we need to make our code consistent with everyone and the code convention is one of the best key here.
![Page 15: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/15.jpg)
Mix indentation formats
We don’t see the different in Editor but in Github they show very clear. It make reviewing pull requests more
difficult and confusing.
![Page 16: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/16.jpg)
Indentation for 4 spaces or tab
Long indentation distance make it hard to follow the code follow, reduce ability to focusing when the line so long.
![Page 17: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/17.jpg)
The best practises
https://github.com/bbatsov/ruby-style-guide
![Page 18: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/18.jpg)
2. Terminal
![Page 19: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/19.jpg)
Command line format customisation
• https://github.com/robbyrussell/oh-my-zsh
• https://github.com/zsh-users/antigen
![Page 20: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/20.jpg)
Sample screenshot
![Page 21: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/21.jpg)
Sample config
![Page 22: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/22.jpg)
3. Source control management (SCM)
![Page 23: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/23.jpg)
Git• Almost RoR developer use git as source control
management system.
• Why? Becasuse it’s very flexible, easy to use and make developer life happier. :)
• For more information and comparision, you can find at:
• http://stackoverflow.com/questions/871/why-is-git-better-than-subversion
• https://git.wiki.kernel.org/index.php/GitSvnComparison
![Page 24: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/24.jpg)
Git flow overview
• Gitk (Linux)
• Git-cola (Mac, Linux, Windows)
• SourceTree (Mac, Windows)
• Linux user can not use SourceTree so a combine of gitk and git cola work fine also.
![Page 25: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/25.jpg)
Git cola
![Page 26: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/26.jpg)
Gitk
![Page 27: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/27.jpg)
SourceTree
![Page 28: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/28.jpg)
4. Conclusion
• Tools for software development are flexible and depend on which languages, platforms that your software written by.
• For Ruby on Rails, this slide has covered some tips and techniques on Sublime, Command Line customisation and Git flow tools.
![Page 29: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/29.jpg)
Happy coding
Hope this help!
![Page 30: IDE, Terminal and SCM to work with Ruby on Rails](https://reader034.vdocument.in/reader034/viewer/2022042614/557d5f38d8b42ae1438b4ef7/html5/thumbnails/30.jpg)
Preference
• http://sublimetext.info/docs/en/
• https://github.com/bbatsov/ruby-style-guide
• https://github.com/styleguide/ruby