I
I
Ilnar252018-09-09 16:54:53
linux
Ilnar25, 2018-09-09 16:54:53

How to run the gem?

We were given the task to create a ruby ​​gem with an executable file, publish it, etc.
Here is the text from the assignment:
Write an nmax script that does the following.......
Run example: cat sample_data_40GB.txt | nmax 10000
Question:
1) where should the sample_data_40GB.txt file be stored in the gem root?
2) I wrote the code (works in irb), but I can’t run it from the linux command line ($ cat sample_data_40GB.txt | nmax 10000) or is there a problem in the gem visibility settings? I'm not a guru, so I didn't enter the topic.
The gem itself https://github.com/ilnar4888/ilnar_nmax
Thanks for the help!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artur Bordenyuk, 2018-09-10
@Ilnar25

Learn how console commands work. You will also need to read about the pipe .
sample_data_40GB.txt - this file should not be in the gem. You can specify any file or part of it. cat is an optional part of the gem. Instead, it could be head or tail, for example.

I
iluwa, 2018-09-10
@iluwa

1) sample_data_40GB.txt should be located where the command "cat sample_data_40GB.txt | nmax 10000" is run
2) you need to make an alias for "nmax".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question