ruby - cannot load such file -


i building own first gem. after created functionality ordered files best practice of gem building.

i moved files right folders. executable in bin/boss-mailer, rest put in lib folder like:

enter image description here

the executable simple. set executable ruby , try require boss_mailer.rb in lib file.

enter image description here

this cannot load file. can require using require "./boss_mailer" beginning pointing current path. but in other gems on github see people use require "filename" reference loading file. here: gli gem

my question

do have pre-build gem or else require files without point current path? have require file lib/boss_mailer' without using ./?

are using bundler? recommend that. running binary as:

bundle exec ./bin/boss_mailer.rb 

please make sure configure $load_path correctly in boss-mailer.gemspec correctly, if you've followed best practices you've done that.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -