hi all, can i install different rails versions on single machine like rails 1.2.2, 1.2.6, 2.0,2.1 etc to workout different applications in different rails versions. if yes, how? currently i''ve rails 1.2.6 and if i run command as "gem install rails", will it overwrite my current rails version? what should i do to keep older and new both versions at the same time? -DP -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The command "gem install rails" will overwrite some commands, in particular the rails command in you path, but the rails command is also part of the gem. Your current rails command will be 1) in your path and 2) in some location like /usr/local/lib/ruby/gems/1.8/gems/ rails-*/bin where the * stands for the version of rails. On Aug 25, 9:46 pm, Dhaval Phansalkar <rails-mailing-l...@andreas- s.net> wrote:> hi all, > can i install different rails versions on single machine like rails > 1.2.2, 1.2.6, 2.0,2.1 etc to workout different applications in different > rails versions. if yes, how? currently i''ve rails 1.2.6 and if i run > command as "gem install rails", will it overwrite my current rails > version? what should i do to keep older and new both versions at the > same time? > > -DP > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Just move rails into the "/vendor" directory of each project using subversion (old versions) or git (newer versions). For example, I use rails 1.2.3 for zena cms so I use (in the vendor directory): # svn export -r 6633 http://svn.rubyonrails.org/rails/trunk/ rails Gaspard> > hi all, > can i install different rails versions on single machine like rails > 1.2.2, 1.2.6, 2.0,2.1 etc to workout different applications in > different > rails versions. if yes, how? currently i''ve rails 1.2.6 and if i run > command as "gem install rails", will it overwrite my current rails > version? what should i do to keep older and new both versions at the > same time? > > -DP > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
And if you need to run the actuals rails executable you can specify the version you want eg rails _1.2.6_ to run version 1.2.6 (assuming you have the corresponding gem) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
hi, thanks for reply. wt i was thinking that i could install all those versions on single machine and just change RAILS_GEM_VERSION in config/environment.rb file. can this be done? @yesterday couldn''t get wt exactly u want to say. can u explain it a bit more on that pls? if i do "gem install rails", will rails-1.2.6 folder be thr only in "C:\ruby\lib\ruby\gems\1.8\gems"? and can i use it RAILS_GEM_VERSION in config/environment.rb file? @gaspard "Just move rails into the "/vendor" directory of each project using subversion (old versions) or git (newer versions)." sorry, i''m not much aware of git or subversion. but wt exactly u mean by rails here? "C:\ruby\lib\ruby\gems\1.8\gems\rails-1.2.5" is it? don''t i have to install all rails versions on the machine before that? what if i want to have rails 2.0? can "gem update rails" fix this? i hope i''m not creating any confusion :D. if so, pls let me know. thanks. P.S.:i''m using windows,rails 1.2.6 -DP -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dhaval Phansalkar wrote:> hi, > thanks for reply. wt i was thinking that i could install all those > versions on single machine and just change RAILS_GEM_VERSION in > config/environment.rb file. can this be done? >Hi Dhaval, Yes, it can be done. When you install a gem, you can pass it -v to tell it what version you want. Without -v, the latest version is installed. So install rails 2.1 _right now_, you could do gem install rails But if you want to install 1.2.6, you would do gem install rails -v 1.2.6 gem actually has pretty good help. gem help commands is a good place to start. Then you can get specific with gem help install Peace, Phillip -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Dhaval Phansalkar wrote:> hi all, > can i install different rails versions on single machine like rails > 1.2.2, 1.2.6, 2.0,2.1 etc to workout different applications in different > rails versions. if yes, how?Freezing the appropriate Rails gems into your application(s) is your friend in this case... rake rails:freeze:gems although I don''t know if that takes an argument for version or not. "Proof of this last statement is left as an exercise for the reader" hehe -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ar Chron wrote:> Dhaval Phansalkar wrote: >> hi all, >> can i install different rails versions on single machine like rails >> 1.2.2, 1.2.6, 2.0,2.1 etc to workout different applications in different >> rails versions. if yes, how? > > Freezing the appropriate Rails gems into your application(s) is your > friend in this case... > > rake rails:freeze:gems > > although I don''t know if that takes an argument for version or not. > > "Proof of this last statement is left as an exercise for the reader" > hehethanks for the reply people. i thought this task is easy but it seems a bit tricky ;). @Phillip i checked the help. thanks for the info :) @Ar Chron freezing rails seems to be a good option. i tried it on a sample application and it worked fine. but i''ve a question here.if i freez my appl to the current rails version(1.2.6) and install 2.0. later on,just in case, if i want to go back to the previous ver i.e. 1.2.6, i''ll do gem install "rails -v1.2.6". in that case, will i have to install all other gems also like hpricot,mongrel etc? -DP -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You can can get all parts of rails (activerecord, actionpack, etc) using subversion (http://subversion.tigris.org) or git (forgot website name). The command using subversion would be: # cd vendor # svn export -r 6633 http://svn.rubyonrails.org/rails/trunk/ rails Replace "6633" by the revision number containing the versions that you want. Doing this, you get to use specific copies for your app, without using the gems for rails stuff. You can use the "previous change", "next change" on the old trac browser to find the revision you need (if you know rails version): http://dev.rubyonrails.org/changeset/7843/trunk/railties/lib/rails/version.rb You end up with a folder containing: your app +- app +- ... +- vendor +- rails +- actionmailer +- actionpack +- actionwebservice +- activerecord +- ... Gaspard> @gaspard > "Just move rails into the "/vendor" directory of each project using > subversion (old versions) or git (newer versions)." > sorry, i''m not much aware of git or subversion. but wt exactly u > mean > by rails here? "C:\ruby\lib\ruby\gems\1.8\gems\rails-1.2.5" is it? > don''t > i have to install all rails versions on the machine before that? > what if > i want to have rails 2.0? can "gem update rails" fix this?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
gem install rails -v=<%=version you want to install%> eg: gem install rails -v=1.2.5 will install the rails version 1.2.5 for you. Infact this option is available while installing any gems. With the option "-v=" will always install the latest version of and gem. You can freeze a different version of rails for an different project. In config/environment.rb specify which rails version you wan to use for that particular project. On Aug 26, 9:14 pm, Gaspard Bucher <gasp...-BovxrB3DcW8@public.gmane.org> wrote:> You can can get all parts of rails (activerecord, actionpack, etc) > using subversion (http://subversion.tigris.org) or git (forgot website > name). The command using subversion would be: > > # cd vendor > # svn export -r 6633http://svn.rubyonrails.org/rails/trunk/rails > > Replace "6633" by the revision number containing the versions that you > want. Doing this, you get to use specific copies for your app, without > using the gems for rails stuff. You can use the "previous change", > "next change" on the old trac browser to find the revision you need > (if you know rails version):http://dev.rubyonrails.org/changeset/7843/trunk/railties/lib/rails/ve... > > You end up with a folder containing: > > your app > +- app > +- ... > +- vendor > +- rails > +- actionmailer > +- actionpack > +- actionwebservice > +- activerecord > +- ... > > Gaspard > > > @gaspard > > "Just move rails into the "/vendor" directory of each project using > > subversion (old versions) or git (newer versions)." > > sorry, i''m not much aware of git or subversion. but wt exactly u > > mean > > by rails here? "C:\ruby\lib\ruby\gems\1.8\gems\rails-1.2.5" is it? > > don''t > > i have to install all rails versions on the machine before that? > > what if > > i want to have rails 2.0? can "gem update rails" fix this?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---