Skip to content

Instantly share code, notes, and snippets.

@priyankamk
Last active September 25, 2019 00:44
Show Gist options
  • Save priyankamk/3c0e636ca2ab1cd19045b5fcdca68287 to your computer and use it in GitHub Desktop.
Save priyankamk/3c0e636ca2ab1cd19045b5fcdca68287 to your computer and use it in GitHub Desktop.
How to create a new ruby project

Ruby Project

  1. Make a folder for your project:

$ mkdir ruby_project

  1. Getting started with bundler is easy! Open a terminal window and run this command:

$ gem install bundler

  1. cd into the project and run this command

$ bundle init

  1. This will create a Gemfile : where you can store all the dependencies that you want to use for the project.
  2. Open the Gemfile in your IDE and add dependencies

$ gem 'rspec', '~> 3.8' $ gem 'pry', '~> 0.10.4'

  1. Run $ bundle install to install all your dependencies.

  2. This will create a Gemfile.lock file where you can find all your dependencies.

  3. create a lib and spec folder

$ mkdir lib $ mkdir spec

Go on with your project!

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