Like most Rails developers, I have lots of Rails apps on my system--running different versions of Rails. As a result, I've now got multiple versions of Rake (0.8.7 and 0.9.2).
Each of the apps is deployed on its own VPS, running just one version of Rails and one version of Rake.
Additionally, there are other developers on these projects that have their own setups, who may or may not have the same (or both) versions of Rake.
What is the best practice for managing this?
Should I specify a version of Rake in my Gemfile (for Rails 3 apps, using Bundler)? If I do so, then I always need to bundle exec rake
, which is fine--but I wonder if that's now the standard. Does everyone have to do this? Is there a way to avoid it?
Also, as noted elsewhere, I have to update my Rakefile with
require 'rake/dsl_definition'
include Rake::DSL
if I want to use Rake 0.9.2. Even then, I get these warnings:
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/file_utils.rb:10: warning: already initialized constant RUBY
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/file_utils.rb:84: warning: already initialized constant LN_SUPPORTED
Should I just specify 0.8.7 in my Gemfile? It seems like I should be able to use 0.9.2.
I (a) need the app on the server to work without bundle exec
, so simple things like rake db:migrate
work, and (b) need something that will play nicely with other developers.
How are folks handling this? What seems to work well? What doesn't?
Any feedback would be greatly appreciated!