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

How to run a ruby command? #18

Closed
lixiangnlp opened this issue Feb 26, 2016 · 1 comment
Closed

How to run a ruby command? #18

lixiangnlp opened this issue Feb 26, 2016 · 1 comment

Comments

@lixiangnlp
Copy link

Hi, I am a new one for Ruby. I have installed the pragmatic_segmenter with the command "sudo gem install pragmatic_segmenter". And could you give my a example rb file to run the tool for text? Because I met the following error when I use the command as your usage in the irb environment.

NameError: uninitialized constant PragmaticSegmenter
from (irb):2
from /usr/bin/irb:12:in `

'

@diasks2
Copy link
Owner

diasks2 commented Feb 27, 2016

Hi @lixiangnlp

After you open IRB, you first need to type the following command:
require 'pragmatic_segmenter'

Also, if you have an rb file that you want to run, you would need to include require 'pragmatic_segmenter' at the top of the file.

If you still have trouble getting it to work please let me know.

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

2 participants