Jian Lin
2010-May-21 09:44 UTC
What happens when Rails 1.3.5 is installed on top of 2.3.5?
On a Mac running Snow Leopard, the Rails version was 2.3.5 (by using rails -v) and then I used gem install to install about 20 things, and maybe there was a line on the instructions that was there in the past that says gem install rails -v=1.3.5 and I ran it anyways, thinking that maybe 1.3.5 is a different version number... and it installed 5 gems (as i remember). Will that actually affect the current rails? Even after the installation, when I use rails -v it still says 2.3.5 and also if it is gem list rails it would list something like rails (2.3.5, 2.3.2, 1.3.5) so looks like they exist nicely with each other without affecting one another? thanks. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2010-May-21 09:57 UTC
Re: What happens when Rails 1.3.5 is installed on top of 2.3.5?
On May 21, 10:44 am, Jian Lin <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> On a Mac running Snow Leopard, the Rails version was 2.3.5 (by using > rails -v) > > and then I used gem install to install about 20 things, and maybe there > was a line on the instructions that was there in the past that says > > gem install rails -v=1.3.5 > > and I ran it anyways, thinking that maybe 1.3.5 is a different version > number... > > and it installed 5 gems (as i remember). > > Will that actually affect the current rails? > > Even after the installation, when I use > > rails -v > > it still says 2.3.5 > > and also if it is > > gem list rails > > it would list something like > > rails (2.3.5, 2.3.2, 1.3.5) > > so looks like they exist nicely with each other without affecting one > another? thanks.Yup, rubygems is designed to handle that sort of thing. Installed executables (eg the rails executable that sets up a new app) will run the latest version), you can run older versions by doing (for example) rails _1.3.5_ anoldapp The fiddly stuff is when the old version of rails doesn''t cope with the version of ruby you have, eg rails didn''t handle ruby 1.8.7 before 2.1 (I think, could be a different version but you get the idea) or uses functionality that was deprecated and later removed in newer versions of rubygems. Fred> -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
pepe
2010-May-22 18:47 UTC
Re: What happens when Rails 1.3.5 is installed on top of 2.3.5?
Just in case it applies here is an extract from the Pickaxe book (Second edition, page 217): "Threre''s a subtlety when it comes to installing different versions of the same application with RubyGems. Even though RubyGems keeps separate versions of the application''s library files, it does not version the actual command you use to run the application. As a result, each install of an application effectively overwrites the previous one." On May 21, 5:44 am, Jian Lin <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> On a Mac running Snow Leopard, the Rails version was 2.3.5 (by using > rails -v) > > and then I used gem install to install about 20 things, and maybe there > was a line on the instructions that was there in the past that says > > gem install rails -v=1.3.5 > > and I ran it anyways, thinking that maybe 1.3.5 is a different version > number... > > and it installed 5 gems (as i remember). > > Will that actually affect the current rails? > > Even after the installation, when I use > > rails -v > > it still says 2.3.5 > > and also if it is > > gem list rails > > it would list something like > > rails (2.3.5, 2.3.2, 1.3.5) > > so looks like they exist nicely with each other without affecting one > another? thanks. > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
Jian Lin
2010-May-23 02:48 UTC
Re: What happens when Rails 1.3.5 is installed on top of 2.3.5?
pepe wrote:> Just in case it applies here is an extract from the Pickaxe book > (Second edition, page 217): > > "Threre''s a subtlety when it comes to installing different versions of > the same application with RubyGems. Even though RubyGems keeps > separate versions of the application''s library files, it does not > version the actual command you use to run the application. As a > result, each install of an application effectively overwrites the > previous one."so that means it will be safest if i re-run gem install rails or gem install rails -v2.3.5 again? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
pepe
2010-May-23 13:01 UTC
Re: What happens when Rails 1.3.5 is installed on top of 2.3.5?
I would, just in case, not being sure of the repercussions that installing a prior version of the gem would have. On May 22, 10:48 pm, Jian Lin <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> pepe wrote: > > Just in case it applies here is an extract from the Pickaxe book > > (Second edition, page 217): > > > "Threre''s a subtlety when it comes to installing different versions of > > the same application with RubyGems. Even though RubyGems keeps > > separate versions of the application''s library files, it does not > > version the actual command you use to run the application. As a > > result, each install of an application effectively overwrites the > > previous one." > > so that means it will be safest if i re-run > > gem install rails > > or > > gem install rails -v2.3.5 > > again? > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
Rick DeNatale
2010-May-23 14:42 UTC
Re: Re: What happens when Rails 1.3.5 is installed on top of 2.3.5?
On Sat, May 22, 2010 at 2:47 PM, pepe <Pepe-gUAqH5+0sKL6V6G2DxALlg@public.gmane.org> wrote:> Just in case it applies here is an extract from the Pickaxe book > (Second edition, page 217): > > "Threre''s a subtlety when it comes to installing different versions of > the same application with RubyGems. Even though RubyGems keeps > separate versions of the application''s library files, it does not > version the actual command you use to run the application. As a > result, each install of an application effectively overwrites the > previous one."That''s actually not the whole story, and excerpt from the output of gem help install: Description: The install command installs local or remote gem into a gem repository. For gems with executables ruby installs a wrapper file into the executable directory by default. This can be overridden with the --no-wrappers option. The wrapper allows you to choose among alternate gem versions using _version_. For example `rake _0.7.3_ --version` will run rake version 0.7.3 if a newer version is also installed. The "actual command you use to run the application" is actually a bit of boilerplate generated by gems which requires the gem and then calls the executable in the bin directory of the gem. If you use that _{version}_ option it requires a specific version of the gem. So if you have both rails 2.3.5 and 1.2.6 installed then either rails or rails _2.3.5_ will run version 2.3.5 which is the latest version installed. but rails _1.2.6_ will run version 1.2.6 HTH BTW, the OP gave rails version 1.3.5 as a example, as far as I know this a fictitious version since rails went from version 1.2.6 to version 2.0.0 -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Jian Lin
2010-May-23 14:59 UTC
Re: Re: What happens when Rails 1.3.5 is installed on top of 2.3.5?
Rick Denatale wrote:> That''s actually not the whole story, and excerpt from the output of > gem help install: > > Description: > The install command installs local or remote gem into a gem > repository. > > For gems with executables ruby installs a wrapper file into the > executable > directory by default. This can be overridden with the --no-wrappers > option. > The wrapper allows you to choose among alternate gem versions using > _version_. > > For example `rake _0.7.3_ --version` will run rake version 0.7.3 if > a newer > version is also installed.What about if Rails 2.3.5 is installed and then 1.2.5 is installed? It seems like after that rails -v will still give 2.3.5. So the default executable is not overwritten or linked to 1.2.5 but to the newest version. Also, if we run rails _1.2.5_ the won''t all the supporting files, script, etc, etc also need to be versioned? So probably that is automatically taken care of as well? So, supposedly, we can install rails in ANY ORDER -- 2.3.5 first, and then 2.2.2 and then 1.2.5 and they still all work well, and the default one is still the 2.3.5 version? wow, if only Windows application can do that too... -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.