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

The Archive Base Latest Questions

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

I defined a simple rake task for running my ruby tests but have the

  • 0

I defined a simple rake task for running my ruby tests but have the problem that rake doesn’t load a gem with the version defined in Gemfile. It get a Gem::LoadError. Is there a way to tell rake which gem version to use?

Here are the gems installed on my system:

addressable (2.2.6, 2.2.4)
bundler (1.0.15)
libarchive (0.1.2)
nokogiri (1.5.0)
rake (0.9.2, 0.8.7)
rdf (0.3.3)

And this is my GemFile:

source :rubygems

gem 'nokogiri', '1.5.0'
gem 'rdf', '0.3.3'
gem 'addressable', '2.2.4'
gem 'libarchive', '0.1.2'

Here the rake task:

require 'rake/testtask'

task :default => [:test]

desc "Run basic tests"
Rake::TestTask.new do |test|
  test.libs << "test"
  test.test_files = Dir["test/test_*.rb"]
  test.verbose = true
end

And this is the exception I get:

/Users/dummy/.rvm/rubies/ruby-1.9.2-head/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:1612:in `raise_if_conflicts': Unable to activate rdf-0.3.3, because addressable-2.2.6 conflicts with addressable (= 2.2.4) (Gem::LoadError)

I can solve the problem by uninstalling addressable 2.2.6 but I need the never version of that gem for another project.

Another solution could be to use rvm gemsets. But isn’t it simply possible to run rake with a given Gemfile specification?

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-23T18:55:24+00:00Added an answer on May 23, 2026 at 6:55 pm

    I think Brian’s suggestion should indeed to the trick:

    bundle exec rake <task>
    

    Also, partitioning gemsets, using for instance rvm gemsets, would be another option… there shouldn’t be a need to uninstall any gem versions.

    Another partitioning technique would be to install all gems inside the project directory (as opposed to installing them as system gems), using something akin to:

    bundle install --path=.bundler
    

    See http://gembundler.com/man/bundle-install.1.html for more info. Note that this latter solution would still require the bundle exec approach to avoid the gem conflicts.

    Hope this helps,

    Peter

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

Sidebar

Related Questions

Let's say we have a simple function defined in a pseudo language. List<Numbers> SortNumbers(List<Numbers>
I want to keep the class simple and not defined a constructor so i
I've got in my webservice a simple public boolean isAlive() service. I defined it
I frequently run into large, non-template classes in C++ where simple methods are defined
Is there a simple way to define a breakpoint, in Visual C++ 2005, that
Man there are a lot of these questions but so far I have not
I'm running into issue which seems to indicate that ActionController::TestCase.get() method ignores what I
I have a simple activity in android where I'm doing something like: givepassw =
I'm looking for something simple to use where the grammar is easy to define.
I defined a record named log . I want to create an mnesia table

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.