commander-rb / commander

The complete solution for Ruby command-line executables
MIT License
821 stars 74 forks source link

Modular style gotcha #23

Closed lebogan closed 8 years ago

lebogan commented 8 years ago

I have been using bundler, rake, and geminabox to build and distribute my gems locally. When I build a classic-style app via the above everything works as expected. Not so with the modular-style. Using 'bundle exec' works. Using 'rake install' does not. My app basically never runs. I traced using this snippet at the end of my app:

puts "Running #{$PROGRAM_NAME}"
puts "#{__FILE__}"
puts $PROGRAM_NAME == __FILE__
MyApplication.new.run #if $PROGRAM_NAME == __FILE__

Running 'bundle exec exe/modapp':

Running exe/modapp
exe/modapp
true

Running 'modapp [option]' after 'rake install' or 'gem install':

Running /home/lewisb/.rvm/gems/ruby-2.2.4/bin/modapp
/home/lewisb/Projects/commander_projects/modapp/exe/modapp
false

Is this expected behavior or am I missing something incredibly basic? I have been using mixins to organize my apps.

Thanks for any insights.

ggilder commented 8 years ago

@lebogan just checking, were you able to resolve this issue?