安装自定义 gem 时只有一个错误:File not found: lib ERROR: While generating documentation
安装继续并说gem installed successfully
。但是,当require 'boxes'
我LoadError: no such file to load -- boxes
查看 gem 目录时,我注意到已安装的 gem 中没有lib/
文件夹。我不确定这是为什么或如何调试它。任何指针?下面是我的 gemspec 文件。
# -*- encoding: utf-8 -*-
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'boxes/version'
Gem::Specification.new do |gem|
gem.authors = ["Name"]
gem.email = ["http://somedomain.com"]
gem.description = %q{Boxes, a Sass framework}
gem.summary = %q{Boxes is a modular Sass-based framework that is heavily configurable, extremely modular and works as a Sass and a CSS Framework}
gem.homepage = "http://somedomain.com"
gem.files = `git ls-files`.split($\)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.name = "boxes"
gem.require_paths = ["lib"]
gem.version = Boxes::VERSION
gem.license = "MIT"
gem.add_dependency "sass", [">= 3.2.0"]
gem.add_development_dependency "rake"
end
我是 ruby 的新手,我只是在这里创建我的第一个宝石,所以请多多包涵。