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 6015903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:54:18+00:00 2026-05-23T02:54:18+00:00

Below are 3 random runs using time rspec spec vs time bundle exec spec

  • 0

Below are 3 random runs using time rspec spec vs time bundle exec spec on a fairly simple rails 3 app. Not using bundler is consistently faster AND it uses a lot less resources, 6% vs 17% cpu.

I’m sure it has something to do with bundler handling the dependencies but I’d like to understand this problem better. I try to practice TDD so of course I run my tests many times throughout the day. If using bundle exec is going to “cost” me in terms of speed and resources then I’m tempted to find a way to avoid the use of bundle exec.

I am using rails 3.0.3, ruby 1.9.2, rspec 2.3, bundler 1.0.10

rspec spec  0.47s user 0.13s system 6% cpu 8.758 total
rspec spec  0.47s user 0.12s system 6% cpu 8.521 total
rspec spec  0.46s user 0.12s system 6% cpu 8.528 total

bundle exec rspec spec  1.35s user 0.30s system 17% cpu 9.293 total
bundle exec rspec spec  1.39s user 0.31s system 17% cpu 9.749 total
bundle exec rspec spec  1.37s user 0.30s system 17% cpu 9.490 total
  • 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-23T02:54:19+00:00Added an answer on May 23, 2026 at 2:54 am

    This doesn’t quite answer your question directly as far as why one is slower. But I wanted to at least say for anyone who finds this later that it’s generally only a coincidence that running executables without using bundle exec works. To quote the Bundler documentation:

    In some cases, running executables
    without bundle exec may work, if the
    executable happens to be installed in
    your system and does not pull in any
    gems that conflict with your bundle.

    However, this is unreliable and is the
    source of considerable pain. Even if
    it looks like it works, it may not
    work in the future or on another
    machine.

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

Sidebar

Related Questions

I'm using the function below to show a random quote in #quotescontainer each time
Using System.Random the below always returns 0. I need a random number between 0
I'm currently using the code below to try and read a random line from
I am using window.open as shown below window.open(<%=forHyperLink%>,'name_' + Math.random(),'height=600,width=800,resizable=0'); But i dont want
General Overview: The function below spits out a random ID. I'm using this to
Below I have a very simple example of what I'm trying to do. I
Below is the code of a simple html with a table layout. In FF
The following codes try to generate random strings over K runs. But we want
I'm getting random crashes from my c# app (Windows 7/VS2008), and it doesn't give
I'm using the code below to Fetch a queried set of all rows using

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.