我的gem activefacts-compositions
中有一个可执行文件。运行gem需要开发依赖项,而不仅仅是运行时依赖项。这个可执行文件不是开发工具,但是gem存在的主要原因 - 所以它不需要开发安装。
测试它:
gem install activefacts-compositions
schema_compositor —help
结果:
Could not find gem 'activefacts (>= 1.8, ~> 1) ruby' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.
然后:
gem install --dev activefacts-compositions
schema_compositor —help
结果:
Available compositors:
binary
relational
Available generators:
ruby
sql
sql/server
summary
validate
答案 0 :(得分:0)
答案(由Eric Hodel在IRC上提供,感谢@drbrain)是我的可执行文件调用:
require 'bundler/setup'
从捆绑包不像现在这样好的日子。删除它,一切都很花哨。