i am trying to write a gem using bundler (following ryan's railcast - 245)
i followed everything described by ryan. I also added 4 ruby files in the lib folder to learn about how require works with different gem.
i thought it will automatically require those rb files put in lib folder.
but unfortunately while i test it it throws an error saying
no such file to load lib/myclass.rb
This what my lorem.rb looks like.
require 'lorem/version'
require 'lorem/myclass'
Module Lorem
.....
end
What am i missing ? can any body tell how gem require works ?
NB : I use to do it with echoe and it works . but when i am using bulder, gemspec and all i simply dont understand why its not loading files .
My gem Spec file
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "lorem/version"
Gem::Specification.new do |s|
s.name = "lorem"
s.version = Lorem::VERSION
s.authors = ["My Name"]
s.email = ["me@domain.com"]
s.homepage = ""
s.summary = %q{learing bundler gem}
s.description = %q{Learing bundler gem}
s.rubyforge_project = "lorem"
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
#s.add_development_dependency "rspec"
#s.add_development_dependency "supermodel"
end
thanks in advance