- OS
- Windows 10
- macOS Sierra
- Install Ruby
- Install Gem packages globally
- bundler
- pry
- byebug
- for 'Ruby Solargraph' extension
- solargraph (for code complete)
- for 'rufo' extension
- rufo (for formatting)
- for 'Ruby' extension
- ruby-debug-ide : 0.6.0 (for debug)
- debase : 0.2.2.beta10 (for debug)
- ruby-lint (for lint)
- reek (for lint)
- rubocop (for lint)
- fasterer (for lint)
- debride (for lint)
- rcodetools (for code complete)
- Currently it does not work well with gem repository version, so you need to download it directly from github and replace it.
- fastri (recommended on 'rcodetools' installing)
- Install VSCode
- Install Plugin
- Simple Ruby ERB
- rufo
- Ruby Solargraph
- or
- Ruby (very heavy on windows)
-
Initialize
$ # make project directory $ mkdir sampleproject $ cd sampleproject $ git init $ mkdir "lib" $ $ # create solargraph config $ solargraph config . $ micro .solargraph.yml $ $ # execute $ touch main.rb $ touch main.rb $ bundle exec ruby main.rb $ $ # install requirement packages $ bundle init $ micro Gemfile $ bundle install --path vendor/bundle $ bundle install --binstubs # create bundler command to ./bin/ $ $ # test $ bundle exec rspec --init $ mkdir spec/lib $ bundle exec rspec $ $ $ # if you use vscode-ruby, you can debug by debugger with VS Code integrated $ # launch a debugger $ ## run debugger for launched $ $ # attach to a debugger $ rdebug-ide main.rb $ ## and then, you run debugger for attaching
-
Download files from Gist and deploy
- project root /
- .bundle /
- .vscode /
launch.json
tasks.json
- bin /
- lib /
bird.rb
- spec /
- lib /
bird_spec.rb
- spec_helper.rb
- lib /
- vendor /
- bundle /
.gitignore
- .rspec
.solargraph.yml
main.rb
Gemfile
Guardfile