Odd problem, trying to figure out what is going on here with my fresh install.
I installed Ruby 1.9.3 using homebrew. I installed Rails 3.2.0 using ruby gems. I then created a test application with rails new test_app to make sure everything looked okay in the test environment. Somehow, the rails environment is using 1.8.7 instead of 1.9.3.
When doing a ruby -v, I get this:
overcast:test_app joe$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]
But when running rails s I get this:
overcast:test_app joe$ rails s
=> Booting WEBrick
=> Rails 3.2.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-01-21 23:21:35] INFO WEBrick 1.3.1
[2012-01-21 23:21:35] INFO ruby 1.8.7 (2010-01-10) [universal-darwin11.0]
And, obviously, when looking at the rails environment webpage at localhost:3000 I am showing 1.8.7 instead of 1.9.3. I’ve edited /etc/paths to have /usr/local/bin at the top based on some answers I’ve found here, but it doesn’t seem to make a difference.
Any help would be greatly appreciated!
Addendum: The same situation happens when installing and attempting to use Ruby through RVM.
If you are running mac os x you have ruby 1.8 preinstalled. Use RVM or rbenv if you want to have more than one ruby version installed.