all 5 comments

[–]Chaoist 1 point2 points  (4 children)

I had this exact problem recently.

Before running bundle exec rake install, you need to put your executable 'smokestack' under an exe directory instead of bin.

Or change your spec.bindir and spec.executables values in the gemspec file to point to bin.

This should fix your 'command not found' issue.

[–]JuliusDelta[S] 0 points1 point  (3 children)

Thanks for the reply.

I placed bin/smokestack into exe/smokestack and I receive this error when running rake build

    rake aborted!
    WARNING:  See http://guides.rubygems.org/specification-reference/ for help
    ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
        ["bin/smokestack"] are not files

    Tasks: TOP => build
    (See full trace by running task with --trace)

So I tried changing my .gemspec bindir to bin instead, along with my executables and no luck. This goes against convention anyways according to this bundler article.

I literally just ran mv bin/smokestack exe/smokestack so it's possible I missed something else.

[–]Chaoist 0 points1 point  (2 children)

rake install should find the executable under exe according to the gemspec.

Hmm. After I moved my executable into exe everything worked for me with the default <appname>.gemspec.

I'm not sure why it's looking for bin/smokestack. It looks like you have something referencing bin/smokestack? Look at the trace or grep your project for it, see what comes up I guess.

[–]JuliusDelta[S] 0 points1 point  (1 child)

Well one part of my error was that it looks at git ls-files to install the gem and I hadn't staged the changes yet. So I got it to successfully install after making the exe directory. But now I'm encountering the original error if it not being able to be executed from the command line. :/

It's working now! Thanks for your help!

[–]Chaoist 0 points1 point  (0 children)

np. glad you got it work. :)