views:

405

answers:

1

Hello,

The latest version of rails installed on my mac is 3.0.0.beta

gem list returns rails (3.0.0.beta, 2.3.5, 2.3.4, 2.3.2, 2.2.2, 1.2.6)

I want to create a new project using version 2.3.5

So I run: rails _2.3.5_ myProject

But it returns the following error

$ rails _2.3.5_ photosbackup
/Library/Ruby/Site/1.8/rubygems.rb:777:in `report_activate_error': RubyGem version error: railties(3.0.0.beta not = 2.3.5) (Gem::LoadError)
    from /Library/Ruby/Site/1.8/rubygems.rb:211:in `activate'
    from /Library/Ruby/Site/1.8/rubygems.rb:1056:in `gem'
    from /usr/bin/rails:18

Any idea how I can create a new project using version 2.3.5?

Thanks

+2  A: 

I think you can just uninstall the previous Rails versions.

Which can be problematic - I have a number of Rails 2.3.5 (and earlier) apps in production that require maintenance and won't be upgraded to the new version.

So what I recommend in this situation is having a look at RVM - it lets you install and manage multiple versions of Ruby, and provides isolation between sets of Gems. I now run a Ruby 1.9.1 with Rails 3 and friends in isolation from my default system settings which let me do my day to day work.

Toby Hede
+1 for the RVM advice - I posted a link up top to a blog post that should help fix the problem - the user would probably still get the same error whilst using RVM but life is SOOOO much easier when you are using RVM... I freaking love it
stephenmurdoch