我正在使用ruby 1.9.3和bundler 1.1.3构建一个gem。在我的gemspec中,我使用executables方法来指定``bin/curd‘是可执行的:
Gem::Specification.new do |gem|
...
gem.executables = ["curd"]
...
endgem源目录有一个bin目录和一个lib目录:
bin/
curd
lib/
curd.rbbin/curd文件使用在lib/curd中定义的代码,但我无法正确地要求它。
如何请求lib/curd文件,以便在安装gem时,bin/curd可以看到它?
发布于 2012-08-01 11:58:00
添加到bin/curd
require 'curd'这将在安装后需要curd gem。
https://stackoverflow.com/questions/11752234
复制相似问题