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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:22:23+00:00 2026-05-29T21:22:23+00:00

i know nothing about ruby, can anyone help explaining what this script is doing

  • 0

i know nothing about ruby, can anyone help explaining what this script is doing please?

 #!/usr/bin/env ruby
 begin
    require '/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler'
    # Check if an older version of bundler is installed(this part i understand)
    $:.each do |path|
    if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9
       err = "Please remove Bundler 0.8 versions."
       err << "This can be done by running `gem cleanup bundler`."
       abort(err)
    end
  end
  #it is from here that i dont understand
  require '/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/cli'
  Bundler::CLI.start
  rescue Bundler::BundlerError => e
    Bundler.ui.error e.message
    Bundler.ui.debug e.backtrace.join("\n")
  exit e.status_code
  rescue Interrupt => e
    Bundler.ui.error "\nQuitting..."
    Bundler.ui.debug e.backtrace.join("\n")
    exit 1
  end

here my irb test:

/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/bin$ irb
irb(main):001:0> require 'bundler'
LoadError: no such file to load -- bundler
from (irb):1:in `require'
from (irb):1
from :0
irb(main):002:0> require 'bundler/cli'
LoadError: no such file to load -- bundler/cli
from (irb):2:in `require'
from (irb):2
from :0
irb(main):003:0> Bundler::CLI.start
NameError: uninitialized constant Bundler
from (irb):3
from :0
irb(main):004:0> 

thanks

  • 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-29T21:22:24+00:00Added an answer on May 29, 2026 at 9:22 pm

    It’s trying to start the bundler CLI, and if it gets a BundlerError or is interrupted it’ll print the stacktrace and exit with a status code. Run the same code from an irb in a directory with a Gemfile and see what happens. It’ll look like what happens if you do a bundle install from the command line.


    $ irb
    ruby-1.9.3-p0 :001 > require 'bundler'
     => true 
    ruby-1.9.3-p0 :002 > require 'bundler/cli'
     => true 
    ruby-1.9.3-p0 :003 > Bundler::CLI.start
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First, Let me apologize as I know NOTHING about ruby. I can read through
know nothing about php, but I have this script that reads a folder and
OS: Mint Linux 11 64bit I know nothing about ruby, I just want Compass.
Well, I know absolutely nothing about the subject, so I really need help. I
i know nothing about ruby but a lot about php. when you code in
This may be a ridiculous question - but I know nothing about videos, video
I know nothing about ruby. Do you know some beginner video tutorials for ruby?
I'm a beginner in JQuery (I know nothing about this framework). I recently found
Caution: I know nothing about C++. I'm comfortable using C#, but this is confusing
i know nothing about medical records but im sure there's great opportunity in it

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.