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

  • SEARCH
  • Home
  • 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 9101171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:03:26+00:00 2026-06-17T01:03:26+00:00

I can not find any documentation on this. My intuition was that add_development_dependency from

  • 0

I can not find any documentation on this. My intuition was that add_development_dependency from a gemspec file should list only additional dependencies that are needed for development and testing and can rely on dependencies specified with add_runtime_dependency to be installed.

I was surprised to discover that gem test command installs only development dependencies, and fails if any runtime dependency is needed during tests.

Is it only gem test quirk or should development dependencies always restate required runtime dependencies, like below:

Gem::Specification.new do |s|
  # ...
  s.add_runtime_dependency 'rack'
  s.add_runtime_dependency 'net-http-persistent'
  s.add_development_dependency 'rack-test'
  s.add_development_dependency 'webmock'
  s.add_development_dependency 'rack'
  s.add_development_dependency 'net-http-persistent'
end

?

  • 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-06-17T01:03:27+00:00Added an answer on June 17, 2026 at 1:03 am

    I think gem test assumes that you have installed the gem you want to test before you actually try to test it.

    gem install whatever
    gem test whatever
    

    All the tests would indicate that this is the case – they call install_stub_gem first, which installs a fake gem to run the gem test commands against.

    I’ve never seen a gem duplicate all its runtime dependencies as development dependencies, and the language of the docs suggests that it wouldn’t make sense to do so:

    development dependencies

    Gems that are used for development purposes only. (emphasis mine)

    Gems that are also runtime dependencies would therefore not fit into this category.

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

Sidebar

Related Questions

I can not find any documentation for this - is it possible?
Can node.js listen on UNIX socket? I did not find any documentation regarding this.
I can not find any documentation that specifies on which thread WebClient raises its
Can you help me solve this problem? I've not managed to find any documentation
I have not been able to find any definitive answers to this question: Can
I've searched around but I can't find any information about this; maybe I'm not
all. Maybe i've not googled enough, but i can't find any example on this
I've spent my requisite two hours Googling this, and I can not find any
I can not find any peek or unread function in the XMLStreamReader documentation. What
i cannot find any documentation of this project

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.