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 trialBrent Sullivan
9,877 PointsRUBY: rvm not recognized
Hi, I am having trouble following along..
Brents-MacBook-Pro:treebook BrentSullivan$ ruby -v ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin13.1.0] Brents-MacBook-Pro:treebook BrentSullivan$ rvm use 2.0.0 -bash: rvm: command not found
If I skip entering rvm in the console, then I can go straight to entering rails server and it typically works, although I have been getting an error message recently, and do not know how to resolve. Any ideas?
The following error pops up in my browser when I attempt to confirm I am riding Ruby on Rails:
ActiveRecord::PendingMigrationError Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue.
Rails.root: /Users/BrentSullivan/treebook
5 Answers
Matthew Reed
Courses Plus Student 17,986 PointsRVM just manages your versions of ruby so you can switch between them on the fly and it makes it easy to install different versions. You don't need it but its nice to have.
Stone Preston
42,016 PointsRVM is quite handy and I recommend you try and get it working. first be sure you have rvm installed by running this command:
\curl -sSL https://get.rvm.io | bash -s stable
that will get the most recent stable version of RVM.
if you still get the rvm not found message after that RVM may not have been added to your PATH correctly. open up your .bash_profile file in sublime text/text editor of your choosing and see if you have anything related to rvm in there
$ cd ~
$ subl .bash_profile
in my .bash_profile ive got the following line
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
it should add that line when it installs though. If not go ahead and copy it in your file and save it. then restart your terminal and see if it works
Matthew Reed
Courses Plus Student 17,986 PointsMake sure you actually have rvm installed. also run rake db:migrate in your terminal
Brent Sullivan
9,877 PointsThanks.
Why do I need rvm?
I essentially killed the session and deleted my treebook directory, then started from scratch and it works now, so not sure where I went wrong.
Brent Sullivan
9,877 PointsGot it. Thank you!