LoadError: RubyGem version error: rake-compiler(0.6.0 not

i tried running the following from commands for creating a class Story
and instance of class called story in Rails script console. (pg
102/103 from Simply Rails 2 book. P. Lenz) I get the following error:

Gem::LoadError: RubyGem version error: rake-compiler(0.6.0 not ~> 0.5.0)

I do not see any environment variables or version numbers I can make
changes to to get RubyGem upto date.

I have tried
Gem update
Gem update -system
gem install
closed and reopend the gem console window

any suggestions are appreciated.

Thanks, Joel

Joel Ma wrote:

i tried running the following from commands for creating a class Story
and instance of class called story in Rails script console. (pg
102/103 from Simply Rails 2 book. P. Lenz) I get the following error:

Gem::LoadError: RubyGem version error: rake-compiler(0.6.0 not ~> 0.5.0)

I do not see any environment variables or version numbers I can make
changes to to get RubyGem upto date.

I have tried
Gem update
Gem update -system
gem install
closed and reopend the gem console window

any suggestions are appreciated.

Thanks, Joel

My work around is “gem uninstall rake-compiler -v 0.6.0”
Run: “Gem install rake-compiler”

next error is “could not find RubyGem : Hoe”
So I run: “Gem install hoe”

finally after all that. back to the console window,
“ruby script/console”
and run the two lines to create a Story class and an instance

“class Story < ActiveRecord::Base; end”
“story = Story.new”

returns> #<Story id: nil, name: nil, link: nil, created_at: nil,
updated_at: nil>

Whew, this seems like a lot of work to get it to go.

Just ran across this thread. I was having a similar problem with
RubyGem version error: rake-compiler(0.6.0 not ~> 0.5.0) and was able
to solve the issue by doing this…

gem uninstall rake-compiler -v 0.6.0

gem install rake-compiler -v 0.5.0

Hope this helps.
~D

Everything

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs