New to Circle CI, having issues with mutiple orbs

version: 2.1

orbs:
  ruby: circleci/ruby@2.0.1
  node: circleci/node@5.0

jobs:
  build:
    resource_class: large
    working_directory: ~/vendors
    docker:
      - image: cimg/node:lts
      - image: cimg/ruby:2.7.7
    executor: ruby/default
    steps:
      - checkout
      - run:
          name: Which bundler?
          command: bundle -v
      - run:
          name: Which node?
          command: node -v
      - run: bundle install
      - run: npm install
      - run: cypress run
      - store_artifacts:
          path: /root/vendors/cypress/screenshots/
          destination: screenshot

This is how my image looks like, the orbs are not working, the second orb runs as a container but it doesnt happen with the 1st one.

What error messages are you seeing and at what point?

One thing the revision of the ORBs you have included are not current, you may want to try and update them to their latest releases.

One key thing, you are aware of what environment you are defining

As it stands you are creating an environment using a large instance of cimg/node:lts and then creating a docker container within this environment that is running cimg/ruby:2.7.7

As such this is an independent docker container that you can use docker commands to remotely access, but it has not added ruby to the main environment, so you do not have ruby available for your config.yml script.

This is detailed here

If you instead select cimg/ruby:2.7.7 as the image to load you will end up with an environment that has both ruby and node available.

Images and ORBs are very different things, with the images being OS based containers, while the ORBs are just pre-built scripts that extend the functionality of the config.yml environment.

Hi, thank you for replying, it means a lot.

If you instead select cimg/ruby:2.7.7 as the image to load you will end up with an environment that has both ruby and node available.

By this you mean, if I select ruby first then node will be automatically installed? I won’t have to do cimg/node:lts or do I? because i tried with just ruby only but it didn’t work because I need node to install cypress and plugins. Whatever command I use first, I always end up with a container that takes forever to build and in the end it gets stopped.

app.screencast com/kjfyrKfmM2ytI

You would only select the ruby image and not try and also load the node image.

Now the time-out is being caused by the bundle command, which I know nothing about, but after a quick search can you try the following commands instead

gem list bundler - you should have gem install and this lists the versions of bundler it knows about

gem install bundler - will install the current version

If you read the docs for the ruby ORB you will see that it has a number of commands to set up a working environment. The ‘ruby/install-deps’ command includes the installing of bundle.

If I won’t select or load the node image then how can i make npm install work? I tried your given commands, i got the same error, bundle -v didn’t work. I changed my config a bit

# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/configuration-reference
version: 2.1

# Orbs are reusable packages of CircleCI configuration that you may share across projects, enabling you to create encapsulated, parameterized commands, jobs, and executors that can be used across multiple projects.
# See: https://circleci.com/docs/orb-intro/
orbs:
  ruby: circleci/ruby@2.0.1
  #node: circleci/node@5.0

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/configuration-reference/#jobs
jobs:
  build:
    resource_class: large
    working_directory: ~/vendors
    docker:
      - image: cimg/ruby:2.7.7
      - image: cimg/node:lts
    executor: ruby/default
    steps:
      - checkout
      - run:
          name: Which bundler?
          command: bundle -v
      - run:
          name: Which node?
          command: node -v
      #- ruby/install-deps
      - run: gem list bundler
      - run: gem install bundler
      #- run: bundle update paper_trail --full-index  
      - run: bundle install
      - run: npm install
      - run: cypress run
      - store_artifacts:
          path: /root/vendors/cypress/screenshots/
          destination: screenshot

# Orchestrate jobs using workflows
# See: https://circleci.com/docs/configuration-reference/#workflows
workflows:
  sample: # This is the name of the workflow, feel free to change it to better match your workflow.
    # Inside the workflow, you define the jobs you want to run.
    jobs:
      - build

Basically, I just want the node to be installed app.screencast com/TITDp1J8OGaTz

My mistake you need to switch the ruby image you are using. The available images are listed here

If you scroll down the list you can see what installed software packages are included in each image and choose one that meets your needs.

Once you have the base image you then just use standard commands to add additional features, such as the bundle tool.

We are also talking about different aspects of the config.yml. I am referring to the docker images, not the ORBs. Within the script you have posted, you are currently not making any use of the ORBs as you are not calling any of the ORB-provided commands.

You may want to look at the example script ruby_rails_sample_app provided for the ruby ORB at

This shows the docker image cimg/ruby:2.7-node being used as the system image and then the ORBs being used to set up the required environments for both ruby and node. Just look at the defined build job without worrying about the rest of the example as they have put a lot of features into a single example and so made it overly complicated.

If your goal is to have a specific version of node installed on a ruby executor, you could do a few things:

  • Use the node variant of the ruby CIMG image: cimg/ruby - CircleCI (e.g., image: cimg/ruby:3.2.2-node).
  • Use the native package manager of the base OS (apt for Debian / Ubuntu, or apk for Alpine) to install node, either from the vendor’s repo or from a third party one like nodesource.
  • Use the install command (not job) as part of a set of steps from the node orb: CircleCI Developer Hub - circleci/node