From: "D. Deryl Downey" Date: 2013-01-03T02:10:22+09:00 Subject: Re: Run time error with multiple version of gems installed This is a multi-part message in MIME format. --------------090500080006080304090002 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Add: gem 'rake', '0.9.2.2' to your Gemfile, and rerun 'bundle install' Then when you run: bundle exec rake it will use the version specified in the Gemfile, as well as lock you to that version in the Gemfile.lock file. Also, if you are creating a gem, you can: gem.add_dependency "rake", "0.9.2.2" in your .gemspec file and ensure that the last line in your Gemfile says gemspec which will then record the dependency, and enforce the version which will automate installing that version of rake when your gem is installed. That last bit is *only* if you're making a gem. It has no application to a regular project. > Matma Rex > January 2, 2013 11:53 AM > > > I'd have to see some of your code, but you probably have to add `gem > 'rake', '0.9.2.2'` before `require 'rake'` somewhere. Otherwise > Rubygems will assume you want the newest version available. > > Mallikarjuna Yaddala > January 2, 2013 1:52 AM > Hi all, > > I have installed two versions of rake for different projects. > > Due to this i am getting the following error > > > rake aborted! > You have already activated rake 0.9.6, but your Gemfile requires rake > 0.9.2.2. Using bundle exec may solve this. > > Can any one help me , how to solve this without changing Gemfile/`bundle > exec` ? > > > FYI : I have two versions of gems > > > rake (0.9.6, 0.9.2.2) > Author: Jim Weirich > Rubyforge: http://rubyforge.org/projects/rake > Homepage: http://rake.rubyforge.org > Installed at (0.9.6): /usr/local/rvm/gems/ruby-1.9.3-p286 > (0.9.2.2): /usr/local/rvm/gems/ruby-1.9.3-p286@global > > Ruby based make-like utility. > > > Thanks in advance ........ > -- D. Deryl Downey "The bug which you would fright me with I seek" - William Shakespeare - The Winter's Tale, Act III, Scene II - A court of Justice. --------------090500080006080304090002 Content-Type: multipart/related; boundary="------------080209020905030902080604" --------------080209020905030902080604 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Add:
    gem 'rake', '0.9.2.2'

to your Gemfile, and rerun 'bundle install'

Then when you run:

    bundle exec rake <some_rake_command_here>

it will use the version specified in the Gemfile, as well as lock you to that version
in the Gemfile.lock file.

Also, if you are creating a gem, you can:

    gem.add_dependency "rake", "0.9.2.2"

in your <gemname>.gemspec file and ensure that the last line in your Gemfile says

    gemspec

which will then record the dependency, and enforce the version which will automate
installing that version of rake when your gem is installed.

That last bit is *only* if you're making a gem. It has no application to a regular project.

January 2, 2013 11:53 AM


I'd have to see some of your code, but you probably have to add `gem 'rake', '0.9.2.2'` before `require 'rake'` somewhere. Otherwise Rubygems will assume you want the newest version available.

January 2, 2013 1:52 AM
Hi all,

I have installed two versions of rake for different projects.

Due to this i am getting the following error


rake aborted!
You have already activated rake 0.9.6, but your Gemfile requires rake
0.9.2.2. Using bundle exec may solve this.

Can any one help me , how to solve this without changing Gemfile/`bundle
exec` ?


FYI : I have two versions of gems


rake (0.9.6, 0.9.2.2)
Author: Jim Weirich
Rubyforge: http://rubyforge.org/projects/rake
Homepage: http://rake.rubyforge.org
Installed at (0.9.6): /usr/local/rvm/gems/ruby-1.9.3-p286
(0.9.2.2): /usr/local/rvm/gems/ruby-1.9.3-p286@global

Ruby based make-like utility.


Thanks in advance ........


--
D. Deryl Downey
"The bug which you would fright me with I seek" - William Shakespeare - The Winter's Tale, Act III, Scene II - A court of Justice.


--------------080209020905030902080604 Content-Type: image/jpeg; x-apple-mail-type=stationery; name="compose-unknown-contact.jpg" Content-Transfer-Encoding: base64 Content-ID: Content-Disposition: inline; filename="compose-unknown-contact.jpg" /9j/4AAQSkZJRgABAQEARwBHAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEC AQEBAQEBAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/2wBDAQEBAQEBAQICAgICAgIC AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/wAAR CAAZABkDAREAAhEBAxEB/8QAGAAAAwEBAAAAAAAAAAAAAAAABgcICQr/xAA0EAABAwMCAgUK BwAAAAAAAAACAQMEBQYRABITIQcUMUF2CBUXIjI2N0JRtVRWkZOV0dL/xAAYAQEAAwEAAAAA AAAAAAAAAAADAAEEAv/EACQRAAICAAQGAwAAAAAAAAAAAAABAhEDMrHREyExM0FxgfDx/9oA DAMBAAIRAxEAPwDuEt+gW/ULet6oVC3rfqNQqFv0OfPn1GhUqfOmzZtKZlS5UqZMaNwzNwiJ VIl7eXLCaZIGwBl3TY8epPx2+jy2ZNPjvkwc9uhW8j7nCPhvOsQliYIeS7cvCpp8o50qwrC4 v3lsNSDbdmTEhvs2tahxpfV3WnmbbozJEw/gwdadbYExVRXKEKoSdvJcaOSqxE7/AAiX0gXx +a69/JSf9alIlste0VzaNpeFrcT9KKymotyiaZ0KRCnzacoE7Kjzn4gi2KqUh3jqDHDHv4mR UfruTWlMzlVUKIVNp9GguEJnAh0+IZjyAiisgyRDnu5azS8miKqjOTVkKqS/psG37fo1Fbab eg25b8eZPeFJBBJSjMG5HjMeyihnaauZwe4OGiju13GAcpOwBeN+U8/IkGbsiS8b7ryogmbz hbyc9REROfZhERO5ETShjPtvpGqTUyLErytS4siSwx5x2tRH4hPOI0DkjZtaJtFxuVEbIUUi yeNujlBUJGbJN6nM/Cyf2Hf60YgjvKA+NPSP4gT7axpcPtr51YWJnYn9dnAQWl722p4ot37y zqnlfp6FrqbwawG8/9k= --------------080209020905030902080604-- --------------090500080006080304090002--