i ve制造了我自己的垃圾,但当我在当地机器中尝试时,有点令人厌恶,即ve角周围和另一个StackOverflow问题,但仍未找到解决这一问题的办法。
如果在后使用非专用用户<>irb和 查询我_own_gem i ve got:
LoadError: no such file to load -- my_own_gem
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require
from (irb):2
from (null):0
但是,在使用根基用户时,用 su子ir子看问题,一切都看着科索沃。
gem list -d my_own_gem
my_own_gem (0.0.1)
Author: Jane Doe
Rubyforge: http://rubyforge.org/projects/my_own_gem
Homepage: google.com
Installed at: /var/lib/gems/1.8
lorem ipsum dolor sit amet
http://www.ohchr.org。
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.8
- RUBY EXECUTABLE: /usr/bin/ruby1.8
- EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /var/lib/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
bashrc
export GEM_HOME=/var/lib/gems/1.8
export GEM_PATH=/var/lib/gems/1.8
my_own_gem.gemspec
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "my_own_gem/version"
Gem::Specification.new do |s|
s.name = "my_own_gem"
s.version = MyOwnGem::VERSION
s.platform = Gem::Platform::RUBY
s.authors = ["Jane Doe"]
s.email = ["j4n3d0e@gmail.com"]
s.extra_rdoc_files = ["MIT-LICENSE","README.rdoc"]
s.rdoc_options = ["--charset=UTF-8"]
s.homepage = "google.com"
s.summary = %q{lorem ipsum}
s.description = %q{lorem ipsum dolor sit amet}
s.date = Time.now.utc.strftime("%A, %d% %B %Y")
s.rubyforge_project = "my_own_gem"
s.add_dependency "httparty", "= 0.7.8"
s.post_install_message = "my own gem"
s.files = `git ls-files`.split("
")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("
")
s.executables = `git ls-files -- bin/*`.split("
").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
end