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 trialAristides Staffieri
14,346 PointsStuck building application
I installed everything using the package manager, but I think there's something wrong with my path. Is anyone familiar with this?
Aristides-Staffieris-MacBook-Pro:~ aristidesstaffieri$ rvm use 1.8.7
Using /Users/aristidesstaffieri/.rvm/gems/ruby-1.8.7-p374
Aristides-Staffieris-MacBook-Pro:~ aristidesstaffieri$ rails new treebook
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:827:in `report_activate_error': Could not find RubyGem rails (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:261:in `activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:68:in `gem'
from /usr/bin/rails:18
Aristides-Staffieris-MacBook-Pro:~ aristidesstaffieri$
9 Answers
Chris McKnight
11,045 PointsThat is a path problem. Do you have [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
in your .bash_profile
or .bashrc
?
Aristides Staffieri
14,346 PointsI don't, it returns "directory does not exist". I'm pretty new to the command line though, not sure where I went wrong.
Chris McKnight
11,045 PointsWhere do you have rvm installed? Did you do a single user installation or multiple user installation?
Aristides Staffieri
14,346 PointsI did a single user installation, I think just in my user folder. Does it get installed where I unzipped the package manager?
Aristides-Staffieris-MacBook-Pro:~ aristidesstaffieri$ ls
Applications Movies Sites
Desktop Music creds-pynwheel.txt
Documents Pictures new
Downloads PrepRules.txt projects
Dropbox Public ruby-1.8.7-p174.tar.gz
Library Send Registration swoop
Chris McKnight
11,045 PointsCan you show the output of ls -a? It is supposed to installed in your user home under the .rvm folder
Aristides Staffieri
14,346 PointsThanks for your help, here it the result of ls -a
Aristides-Staffieris-MacBook-Pro:~ aristidesstaffieri$ ls -a
. .netExtender.log Library .. .netExtenderCerts Movies .CFUserTextEncoding .netextender Music .DS_Store .rvm Pictures .Trash .sass-cache PrepRules.txt .adobe .subversion Public .bash_history .zlogin Send Registration .bash_profile .zshrc Sites .bashrc Applications creds-pynwheel.txt .cups Desktop new .dropbox Documents projects .gem Downloads ruby-1.8.7-p174.tar.gz .gitconfig Dropbox swoop Aristides-Staffieris-MacBook-Pro:~ aristidesstaffieri$
Chris McKnight
11,045 PointsNo problem. What does ls .rvm/scripts show?
Aristides Staffieri
14,346 Pointsls -a
. .netExtender.log Library .. .netExtenderCerts Movies .CFUserTextEncoding .netextender Music .DS_Store .rvm Pictures .Trash .sass-cache PrepRules.txt .adobe .subversion Public .bash_history .zlogin Send Registration .bash_profile .zshrc Sites .bashrc Applications creds-pynwheel.txt .cups Desktop new .dropbox Documents projects .gem Downloads ruby-1.8.7-p174.tar.gz .gitconfig Dropbox swoop Aristides-Staffieris-MacBook-Pro:~ aristidesstaffieri$ ls .rvm/scripts alias gemsets patches aliases get patchsets autolibs group pkg base hash repair cd help requirements cleanup hook rtfm cli info rubygems completion initialize rvm cron install selector db irbrc selector_gemsets default irbrc.rb selector_late disk-usage list selector_parse docs maglev set env manage snapshot external migrate tools extras monitor upgrade fetch notes version fix-permissions osx-ssl-certs wrapper functions override_gem zsh
Chris McKnight
11,045 PointsDoes source .rvm/scripts/rvm
work? If so, what do echo $HOME
and echo $PATH
show? Are you by chance using zsh
(I use oh-my-zsh).
Aristides Staffieri
14,346 Pointsit outputs no such file or directory
Aristides-Staffieris-MacBook-Pro:~ aristidesstaffieri$ echo $HOME
/Users/aristidesstaffieri
Aristides-Staffieris-MacBook-Pro:~ aristidesstaffieri$ echo $PATH
/Users/aristidesstaffieri/.rvm/gems/ruby-1.8.7-p374/bin:/Users/aristidesstaffieri/.rvm/gems/ruby-1.8.7-p374@global/bin:/Users/aristidesstaffieri/.rvm/rubies/ruby-1.8.7-p374/bin:/Users/aristidesstaffieri/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin
Chris McKnight
11,045 PointsSeems like an rvm file is missing. I would try removing the .rvm folder and reinstalling rvm using the curl command on the website, curl -L https://get.rvm.io | bash -s stable
. Personally, I use rbenv.