You are not logged in.

#1 2013-09-22 00:11:46

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

[Solved] Gem will not install the proper rake version

I need a very specific version of rake to work with Octopress, which I'm working to deploy, but for some reaosn whenever I attempt to install the version I need, using

gem install rake --version=0.9.2.2

it does not install the requested version. I have also tried

gem install rake -v '0.9.2.2'

but in both cases the result is the same.

[james@arch ~]$ ~/.gem/ruby/2.0.0/gems/rake-0.9.2.2/bin/rake --version
rake, version 0.9.6

Does anyone have any tips or insights on why it might be doing this?

Last edited by ub1quit33 (2013-09-22 19:18:15)

Offline

#2 2013-09-22 00:18:10

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Gem will not install the proper rake version

Set the requisite versions in your gemfile and then use bundler to pull everything in.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-09-22 15:06:22

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [Solved] Gem will not install the proper rake version

Thanks for the response! I gave you suggestion a shot by editing the gemfile to read as follows

source "https://rubygems.org"

group :development do
  gem 'rake', '~> 0.9.2.2'
...

and then ran the following operations

[james@arch www.lottspot.com]$ gem uninstall rake

Select gem to uninstall:
 1. rake-0.9.2
 2. rake-0.9.2.2
 3. All versions
> 3
Successfully uninstalled rake-0.9.2
Successfully uninstalled rake-0.9.2.2
[james@arch www.lottspot.com]$ bundle install
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Installing rake (0.9.2.2)
...

Unfortunately though, it seems to yield the same result.

[james@arch www.lottspot.com]$ rake --version
rake, version 0.9.6
[james@arch www.lottspot.com]$ ~/.gem/ruby/2.0.0/gems/rake-0.9.2.2/bin/rake --version
rake, version 0.9.6

Any other suggestions, ideas, or troubleshooting tips are very welcome, and very appreciated!

Offline

#4 2013-09-22 16:59:24

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [Solved] Gem will not install the proper rake version

Wow. Silly me. The fix to my problem was dead simple, and now I feel foolish. For the sake of any future readers though, here's what I needed to do.

I was receiving the following errors (which I obviously didn't read closely enough)

[james@arch www.lottspot.com]$ rake install 
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.

So I just needed to apply the following to my Gemfile.

--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,7 @@
 source "https://rubygems.org"
 
 group :development do
-  gem 'rake', '~> 0.9'
+  gem 'rake', '~> 0.9.6'
   gem 'jekyll', '~> 0.12'
   gem 'rdiscount', '~> 2.0.7'
   gem 'pygments.rb', '~> 0.3.4'

Offline

#5 2013-09-22 17:57:17

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [Solved] Gem will not install the proper rake version

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2013-09-22 19:18:26

ub1quit33
Member
Registered: 2013-04-30
Posts: 58

Re: [Solved] Gem will not install the proper rake version

Done!

Offline

Board footer

Powered by FluxBB