Skip to content
kojix2 edited this page Jun 29, 2020 · 6 revisions

I'm new to Ruby. How do I develop it?

Ruby

No problem. Now you are going to learn how to develop a ruby gem.

First, fork and clone the GR.rb repository.

git clone https://github.com/your_name/GR.rb
cd GR.rb

Then, install dependencies with bundler.

bundle install

Let's write some codes.

vi lib/gr/plot.rb

You can check your changes in REPL by calling irb/pry with bundler. IRB is a ruby's standard REPL. pry is a more powerful one.

bundle exec irb -r gr/plot
# or bundle exec pry -r gr/plot

All right? Testing is easy.

bundle exec rake test

Looks good? Please send us your pull requests!

git checkout -b kojix2-patch # s/kojix2/your_name/
git add .
git commit -m "Improve hotdog plot"
git push origin kojix2-patch # s/kojix2/your_name/

You can install from the source code if you would like to.

bundle exec rake install
# rake install