ruby / ruby/rubygems

Bundler should be able to use a `.gemspec` file in the absence of Gemfile

Open
#5,019 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bundler
Dominant language
Ruby
Stars
4k
Forks
1.9k
Avg merge
1d 2h
Merged PRs (30d)
81

Description

Describe the problem as clearly as you can

Often times a Gemfile is not needed for development but other people are accustomed to using it/bundler. In such cases a dummy Gemfile with the contents

gemspec

is sufficient.

Since the Gemfile doesn't add anything except another file, bundler should fall back to a .gemspec file if a Gemfile is not found and treat it like the above dummy file. The fallback should only work if there is a single .gemspec file (or, even more strict, a single ${cur_dir}.gemspec file, e.g. mygem/mygem.gemspec).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Start by tracing Bundler's Gemfile discovery behavior and its handling of a single .gemspec; verify the fallback works only when no Gemfile exists and exactly one eligible .gemspec is present, while existing behavior remains unchanged for multiple gemspecs.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.