Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6713151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:20:43+00:00 2026-05-26T08:20:43+00:00

I’m trying to build a custom gem I wrote called client_package but it is

  • 0

I’m trying to build a custom gem I wrote called client_package but it is failing.

My directory structure looks like this:

client_package
    Gemfile
    Gemfile.lock
    client_package.gemspec
    Rakefile
    Readme.md
    .gitignore
    .git
        ...git files...
    lib
        client_package.rb
        client_package
            version.rb
            api.rb
            ...more...

And my client_package.gemspec looks like this:

# encoding: UTF-8
require File.expand_path('../lib/client_package/version', __FILE__)

Gem::Specification.new do |s|
    s.name = 'client_package'
    s.version = ClientPackage::VERSION
    s.platform = Gem::Platform::RUBY

    s.files = `git ls-files`.split('\n')
    s.executables = `git ls-files -- bin/*`.split('\n').map{ |f| File.basename(f) }
    s.require_paths = ['lib']

    # also have s.authors, s.email, s.homepage, s.summary, s.description

    s.add_dependency 'httparty'
    s.add_dependency 'json'
end

And all my files are committed and the git state is clean.

From within the top client_package directory, I run gem build client_package.gemspec and get this error:

ERROR:  While executing gem ... (Gem::InvalidSpecificationException)
    [".gitignore
Gemfile
Rakefile
Readme.md
client_package.gemspec
lib/client_package.rb
lib/client_package/api.rb
lib/client_package/version.rb
lib/client_package/...more...
"] are not files

This is puzzling to me, because those certainly seem to be files to me. Anyway, I figured there is some path problem if it’s not seeing these files, and just doing some trial and error I discovered that if I go up a directory (one above the top-level client_package) and then run gem build client_package/client_package.gemspec it does appear to work at first, creating the file client_package-1.0.0.gem. But something is still wrong. If I then install that gem with gem install client_package-1.0.0.gem that also appears to work. But then this:

require 'rubygems'
require 'client_package'

Returns LoadError: no such file to load -- client_package.

I feel like I must be missing something small but important. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T08:20:44+00:00Added an answer on May 26, 2026 at 8:20 am

    This’d be small but important:

    Should split('\n') be split("\n")?

    Because it looks like

    [".gitignore
    Gemfile
    Rakefile
    Readme.md
    client_package.gemspec
    lib/client_package.rb
    lib/client_package/api.rb
    lib/client_package/version.rb
    lib/client_package/...more...
    "]
    

    could be an array containing a single multiline string, not an array of multiple strings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have some data like this: 1 2 3 4 5 9 2 6
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.