I’m kinda new to ruby and I’d like to use a gem charting library, but for some reason when I require it in the ruby script on my desktop it doesn’t work. However when I require in my irb it does work. Is there a way to fix this?
I’m kinda new to ruby and I’d like to use a gem charting library,
Share
Try using bundler if you can and declare the requirements in a
Gemfile. This will make your environment much more consistent between different computers and will provide a reference of the dependencies you have.The Bundler setup procedure is pretty simple and well documented. It will load in all the gems and any of their dependencies automatically.
Generally the problem with the
requirestatement failing is the library is not in your$LOAD_PATH, and that’s usually because you haven’t loadedrubygems: