0

I ran gem update the other day in Command Prompt with Ruby and Rails. There was a flurry of text, and it said such things as ...rdocs rails 4.0.0 (I forget exactly what it was saying) and all in all it took about 40 minutes (the rails 4.0.0 listings seemed to be longest.) However, I used bundle install after that, and I'm still using 3.3.2 rails, and worse, using old models of all the other gems (most noticeably shoulda and shoulda-matchers.) Please help me see what I did wrong, whatever it might have been. I'd like to update my gems all at once, if appropriate (I am new so I don't know if its recommended.)

CodeWalrus
  • 5,628
  • 1
  • 16
  • 18

2 Answers2

1

If you want to update your project gems (which features updating Gemfile.lock and actually updating proper gems), you need to run:

bundle update
Marek Lipka
  • 50,622
  • 7
  • 87
  • 91
0

To run an RoR command line on a project, you have to make sure you are in that project's root folder beforehand. For example, if your projects are in c:\projects and you are working on project trythisone, you need to be in c:\projects\trythisone before you run bundle update or any similar command.

You probably don't need rdoc, anyway, so follow this advice. To be clear, in Windows 8 you would need to go to your users folder and add a file called ".gemrc". Thus, for a user called "myuser", you would have a file at: (Earlier Windows versions would be in their particular users folder)

c:\users\myuser\.gemrc

This file would contain the following text:

gem: --no-ri --no-rdoc

Marek Lipka was correct in that bundle update is needed.

Community
  • 1
  • 1
Richard_G
  • 4,700
  • 3
  • 42
  • 78