Should a gemspec include itself?

Hello,

I ran into an error when trying to run rake test in the root directory
of a gem that uses the following in its Rakefile:

Bundler::GemHelper.install_tasks

The error I got is:

Unable to determine name from existing gemspec. Use :name => ‘gemname’
in #install_tasks to manually set it.

Adding name: some_gem to the install_tasks call changed the error to:

Errno::ENOENT: No such file or directory -
<>/gems/some_gem-0.0.1/some_gem.gemspec

Adding the gemspec file to its own files list is easy, but if feels
strange. I looked at other gems and I found some that include the
gemspec and some that dont.

So, what is the accepted practice regarding gemspecs. Can they be a part
of the package? Or is there better way?

Thanks,
Ammar

On Oct 8, 2014, at 6:50 PM, Ammar A. [email protected] wrote:

Adding the gemspec file to its own files list is easy, but if feels strange. I
looked at other gems and I found some that include the gemspec and some that dont.

So, what is the accepted practice regarding gemspecs. Can they be a part of the
package? Or is there better way?

Answering my own question, to help someone who might stumble upon it.

Obviously the gemspec file does not include itself, so if you have any
tasks that depend on it, include it in its own files list.

I was hoping others would have some insights or pointers, but I guess
its just as simple as that.

Ammar