require command does not work on Gem for ruby

Asked

Viewed 365 times

1

I installed the Ruby, the Railsinstaller and the Rubydevkit no on partition C (e.g. c: Ruby23-x64).

Execution in cmd

ruby -v

inserir a descrição da imagem aqui

appears the version of ruby installed smoothly. Executed

Gem install pipedrive-ruby

and also installs without problems, but when I run

require 'pipedrive-ruby'

gives 'require' error is not recognized as internal or external command... When I execute

Gem list

inserir a descrição da imagem aqui

pipedrive-ruby appears as Gem location normally.

What am I doing wrong?

I’m trying to execute the Gem’s pipedrive.

  • You can add the error backtrace here?

  • @Rafaelfidelis I was trying to execute the code via cmd, it was difficult to execute. I just started using a file .rb. Now it worked, Thank you.

1 answer

0

In fact, any require Gem dependency in ruby must be declared at the beginning of the code, within the file . Rb

An example is:

require 'rubygems'
require 'bundler'
require 'date'

After this it is possible to use the resources available in Gem.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.