Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot load such file -- correios-sro #6

Open
mcruvinel opened this issue Mar 23, 2023 · 0 comments
Open

cannot load such file -- correios-sro #6

mcruvinel opened this issue Mar 23, 2023 · 0 comments

Comments

@mcruvinel
Copy link

Gem está instalada corretamente, mas ao tentar executar o script que está no readme retorna esse erro:
.rbenv/versions/3.1.2/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in require': cannot load such file -- correios-sro (LoadError)`

Segue código abaixo:

require 'correios-sro'
require 'rubygems'

# Define o código de rastreamento da encomenda
tracking_code = 'XXXXXXXXXXXX'

# Realiza a consulta de rastreamento utilizando a biblioteca correios-sro
result = Correios::SRO::Tracker.new(tracking_code).track

# Exibe o resultado da consulta
puts result.to_json


gem install correios-sro                                                                                                                                                                       04:41:45 
Successfully installed correios-sro-3.0.0
Parsing documentation for correios-sro-3.0.0
Done installing documentation for correios-sro after 0 seconds

Depois de rodar "bundle install"
Using correios-sro 3.0.0
1 gem installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant