Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Ruby Gems Gems In Depth The Gem Environment

Sean Flanagan
Sean Flanagan
33,235 Points

cd gems

Hi.

I can't access gems. This is what I put into the console:

treehouse:~$ cd .local/                                                                          
treehouse:~/.local$ ls                                                                           
treehouse:~/.local$ cd gems                                                                      
-bash: cd: gems: No such file or directory                                                       
treehouse:~/.local$ ls gems                                                                      
ls: cannot access gems: No such file or directory                                                

I would appreciate any help.

4 Answers

Seth Reece
Seth Reece
32,867 Points

Hi Sean,

If you are still using workspaces, the directory structure is different than in this video. I'm not sure when this video was made. Currently, as Steve mentioned, gem environment gives me a path of /usr/local/lib/ruby/gems/2.2.0 . From the default location when launching workspaces you will want to go up three folders, then down six folders. e.g. cd ../../../usr/local/lib/ruby/gems/2.2.0 . Then you can use cd gems followed by ls and see the installed gems.

Sorry - I hadn't realised this was a Workspaces thing.

Hi Sean,

Try typing gem environment first - that'll give you some clues as to where your gems are installed.

Mine, for example, are in /Users/username/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0 and /Users/username/.gem/ruby/2.2.0

I think it is installation dependent - the environment command gives you the paths and other installation metrics.

I hope that helps

Steve.

Can you show me the code for the question: "Type the command to get information about the Ruby Gems environment."?

Is that gem environment?

Steve.

Yes. But I found out the code myself. Here's is the correct code:

gem environment