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 trialSean Flanagan
33,235 Pointscd 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
32,867 PointsHi 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.
Steve Hunter
57,712 PointsHi 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.
Hannah Flynn
21,429 PointsCan you show me the code for the question: "Type the command to get information about the Ruby Gems environment."?
Steve Hunter
57,712 PointsIs that gem environment
?
Steve.
Hannah Flynn
21,429 PointsYes. But I found out the code myself. Here's is the correct code:
gem environment
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsSorry - I hadn't realised this was a Workspaces thing.