views:

28

answers:

2

I tried to do:

rake db:migrate

to get this app from github installed on my mac, and I got this error:

Missing the Rails 2.1.1 gem. Please `gem install -v=2.1.1 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.

how can I temporarily or for this app only run 2.1.1.?

+1  A: 

it is best to use RVM if you use Mac OS X or Ubuntu.

simply create another gemset

rvm install 1.8.7    or whatever Ruby version
rvm 1.8.7
rvm gemset create rails2.1.1
rvm gemset use rails2.1.1
gem install -v 2.1.1 rails
rails -v

and now you will be using rails 2.1.1. You can create other gemsets, and also use rvm 1.8.7@rails238 to change to the Ruby with the gemset. You can also install Ruby 1.9.2 like the first line above and create different gemsets as well.

動靜能量
when typing 'gem install -v 2.1.1' i got an error saying "error while executing gem, please specify at least one gem name e.g. gem build gemname)
Blankman
You really shouldn't install Rvm unless you seriously need to use a different version of ruby.
Trip
it is `gem install -v 2.1.1 rails` Sorry I made a type up there earlier
動靜能量
A: 

In case you're not using RVM, just do what the error message says. Execute $ gem install -v=2.1.1 rails then you're good to go.

Hoa