rake install not including all files

21 views
Skip to first unread message

gw

unread,
Sep 22, 2010, 2:54:30 AM9/22/10
to jeweler.rb
First crack at making a gem, jeweler, and not all that familar with
rake either.

I created a new gem using the jeweler command. Fairly simple gem with
a few files that add some convenience methods to bare Ruby classes.

So, I have /lib/gw_extensions.rb which requires all my files using the
typical: require 'extensions_array.rb'

I also have a CHANGELOG.rdoc file, and I've modified this line to
include it:
rdoc.rdoc_files.include('README.rdoc', 'LICENSE', 'CHANGELOG.rdoc')

Problem when I "rake install" none of my files like /lib/
extensions_array.rb are installed, and the CHANGELOG file is not
installed either.

Stumped. Ideas? Thx.

-- gw

Anuj Dutta

unread,
Sep 22, 2010, 5:07:34 AM9/22/10
to jewel...@googlegroups.com
Is your gem a git repository? I think it needs to be...I don't remember exactly but I had a similar issue.

Anuj
--
Anuj DUTTA

Pat Allan

unread,
Sep 22, 2010, 9:56:39 AM9/22/10
to jewel...@googlegroups.com
Is it related to the .documents file that Jeweler creates by default? (Which I always delete straight away) Apparently the gemspec builds a file list from that automatically...

--
Pat

Josh Nichols

unread,
Sep 22, 2010, 10:18:17 AM9/22/10
to jewel...@googlegroups.com
Jeweler will populate your gemspec with files it finds in git by default. Make sure to `git add` any uncommitted files.

Or, you can also manage these yourself:

Jeweler::Tasks.new do |gemspec|
  # your original stuff here
  gemspec.files.include "lib/**"
  gemspec.files.include "README"
  gemspec.files.include "LICENSE"
  gemspec.files.include "ChangeLog.rdoc"
end

At this point, `rake install` should have the files you were looking for.

- Josh

gw

unread,
Sep 23, 2010, 12:14:43 AM9/23/10
to jeweler.rb
On Sep 22, 7:18 am, Josh Nichols <j...@technicalpickles.com> wrote:
> Or, you can also manage these yourself:
> Jeweler::Tasks.new do |gemspec|
>   # your original stuff here
>   gemspec.files.include "ChangeLog.rdoc"
> end

I figured there had to be a way to do that, but I wasn't getting the
syntax details correct.

Thanks.

gw

unread,
Sep 23, 2010, 12:34:00 AM9/23/10
to jeweler.rb

On Sep 22, 7:18 am, Josh Nichols <j...@technicalpickles.com> wrote:
> Or, you can also manage these yourself:
>
> Jeweler::Tasks.new do |gemspec|
>   # your original stuff here
>   gemspec.files.include "lib/**"
>   gemspec.files.include "README"
>   gemspec.files.include "LICENSE"
>   gemspec.files.include "ChangeLog.rdoc"
> end


And just for the record this worked too:
gem.files.include('lib/**/*.rb')


Reply all
Reply to author
Forward
0 new messages