[Bug 726690] Review Request: rubygem-rails2.3 - rails 2 alongside rails 3
bugzilla at redhat.com
bugzilla at redhat.com
Thu Aug 4 16:09:40 UTC 2011
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.
https://bugzilla.redhat.com/show_bug.cgi?id=726690
--- Comment #12 from Emanuel Rietveld <codehotter at gmail.com> 2011-08-04 12:09:39 EDT ---
(In reply to comment #9)
> Btw Rails 2 and Rails 3 will conflict at least by its binary, i.e.
> /usr/bin/rails
Thank you Vít Ondruch
I have thought about this and believe this not to be the case. The content of
the /usr/bin/rails script in the rails2.3 package and the rails 3 package is
exactly the same. Here is it in full:
> #!/usr/bin/ruby
> #
> # This file was generated by RubyGems.
> #
> # The application 'rails' is installed as part of a gem, and
> # this file is here to facilitate running it.
> #
>
> require 'rubygems'
>
> version = ">= 0"
>
> if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
> version = $1
> ARGV.shift
> end
>
> gem 'rails', version
> load Gem.bin_path('rails', 'rails', version)
If you have both rails 2 and rails 3 installed, it defaults to using rails 3:
$ rails --version
Rails 3.0.5
But you can call it asking for a specific version:
$ rails _2.3.12_ --version
Rails 2.3.12
$ rails _3.0.5_ --version
Rails 3.0.5
Of course I am open to a difference of opinion. Do you have any suggestions?
Perhaps I could leave /usr/bin/rails out of the rails-2.3 package. It is also
possible to make a /usr/bin/rails2 script that defaults to using rails2. We
only need to change one line.
- version = ">= 0"
+ version = "< 3"
--
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the package-review
mailing list