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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:01:48+00:00 2026-06-06T09:01:48+00:00

I have rails (2.3.5) and prawn (0.12.0) installed. When I install prawnto , gem

  • 0

I have rails (2.3.5) and prawn (0.12.0) installed. When I install prawnto, gem installs rails version 3.2.6 also.

The dependency of prawnto is:

prawn >= 0
rails >= 2.1

Why gem install Rails 3.x when the prawnto dependency is already there?

  • 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-06T09:01:50+00:00Added an answer on June 6, 2026 at 9:01 am

    tl;dr Use Bundler. It rocks.

    Alright, this is basically down to how dependency resolution works in RubyGems. If you’re not terribly familiar with it, get up to speed real quick like with the Primer panel from this XKCD comic. RubyGems dependency management and the Primer storyline are very similar in terms of complexity.

    When a gem specifies a dependency of, say rails >= 2.1, when you go to install that gem, RubyGems conveniently ignores all the gems that you’ve currently got installed and then queries the web API to find the absolute latest version of Rails that’s greater than or equal to 2.1.

    It will find, as of this writing, version 3.2.6, and so will dutifully install that version of Rails because it fits the dependency requirements. It will also install every single dependency of Rails, and their dependencies, and the sub-sub-sub-sub-dependencies all the way down until there’s not a gem left without a dependency installed.

    I won’t go into exactly how that works because it makes my vision go blurry when I think about it.


    Now, if you were using something that’s not pure-RubyGems such as Bundler, you’d be able to have a Gemfile like this:

    source 'http://rubygems.org'
    gem 'rails', '2.3.4'
    gem 'prawnto', '0.1.1'
    

    And then run bundle install and then something magical will happen. Bundler will figure out the dependencies for all the gems specified in the Gemfile, as well as the gems that they depend on, and then install only those gems.

    This means that if you have prawnto wanting Rails >= 2.1, it won’t install 3.2.6 because there’s another dependency saying that Rails must precisely be 2.3.4. So therefore Rails 2.3.4 will be installed.

    If you have conflicting versions, with a gem A specifying a dependency on gem B of ~> 1.0, but then gem C specifying a dependency that gem B must be ‘= 0.5.0’, Bundler won’t be very happy and will raise an error because the dependencies can’t be resolved.


    I’d really recommend using Bundler for all your Rails projects. Even those that are running on Rails 2. There’s a page on the Bundler website which will get you started with a Rails 2.3 project and Bundler.

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

Sidebar

Related Questions

I have created a pdf version of our rails application using the Prawn plugin,
I'm unable to have rails recognize the mysql2 gem that I've installed. I'm using
I have rails version 3.2.1 in my machine. The other versions installed are 3.0,
I have Rails 3.2.8 installed and what gem update --system says is the latest
I have rails 3.017, and clearance 1.0.0.rc2 and trying to install gem 'jquery-rails', '~>
I have Rails 3.2.11 installed on Ruby with version 1.9.3-p374 via RVM on Ubuntu
I have Rails 3.1.3 app and trying to plug gem redis to it. I've
Is there a way to have rails print out a number with commas in
Hi i have create a PDF conversion in my rails application using Prawn and
I have a problem in rails with displaying the euro symbol in a prawn

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.