Hi, Is there a clean way to ensure that a particular rails project uses a particular version of rake? I had a problem when a gem (calendar_date_select) upgraded my rake gem. The newer version (0.8.4) wasn''t backward compatible with the older one (0.7.3). Running ''rake'' seems to use the latest version of rake, regardless of the version of Rails, i.e. I''d specified "RAILS_GEM_VERSION = ''1.2.5''" in environment.rb. Thanks, Brian Hartin -- Posted via http://www.ruby-forum.com/.
On Tue, Jul 28, 2009 at 3:11 PM, Brian Hartin<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi, > > Is there a clean way to ensure that a particular rails project uses a > particular version of rake? > > I had a problem when a gem (calendar_date_select) upgraded my rake gem. > The newer version (0.8.4) wasn''t backward compatible with the older one > (0.7.3). Running ''rake'' seems to use the latest version of rake, > regardless of the version of Rails, i.e. I''d specified > "RAILS_GEM_VERSION = ''1.2.5''" in environment.rb.Well you can invoke rake with a specific version number bracketed with underscores $rake _0.7.3_ This is a standard feature of gem packaged binaries. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale
Rick Denatale wrote:> On Tue, Jul 28, 2009 at 3:11 PM, Brian > Hartin<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> "RAILS_GEM_VERSION = ''1.2.5''" in environment.rb. > Well you can invoke rake with a specific version number bracketed with > underscores > > $rake _0.7.3_ > > This is a standard feature of gem packaged binaries. > > -- > Rick DeNatale > > Blog: http://talklikeaduck.denhaven2.com/ > Twitter: http://twitter.com/RickDeNatale > WWR: http://www.workingwithrails.com/person/9021-rick-denatale > LinkedIn: http://www.linkedin.com/in/Thanks. I was hoping for a way to do it in the Rails environment.rb file, like ''RAKE_VERSION = ...''. I think I can set ''rake path'' there, but that seems like a hack. I''d like to just specify the version, and let rails figure it out. When I run ''gem dependency rails -v 1.2.5'', I get: Gem rails-1.2.5 rake (>= 0.7.2, runtime) activesupport (= 1.4.4, runtime) activerecord (= 1.15.5, runtime) actionpack (= 1.13.5, runtime) actionmailer (= 1.3.5, runtime) actionwebservice (= 1.2.5, runtime) It''s interesting that a given rails version depends on specific versions of the ''[active|action]*'' gems, but it will use the latest version of Rake (over 0.7.2). Thanks again, Brian -- Posted via http://www.ruby-forum.com/.