Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Copy the bin to railties so it also works if you don't have the rails…

… gem.
  • Loading branch information...
commit e3053ee753c3035e9d8337680212aba525c27376 1 parent 0a87362
José Valim josevalim authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  railties/bin/rails
2  railties/bin/rails
View
@@ -0,0 +1,2 @@
+#!/usr/bin/env ruby
+require "rails/cli"

8 comments on commit e3053ee

Jeremy Kemper
Owner

As of RubyGems 1.8.10, this makes gem install prompt about overwriting the executable, and crashes bundle install. See #2400.

José Valim
Owner

That's why we can't have nice things.

Philip Arndt

@josevalim this is why you can :-) bundler/bundler@da27033

Jeremy Kemper
Owner

The bundler fix is great, but gem install will still give a confusing prompt about rails overwriting its own stuff :'(

Aaron Patterson
Owner

@josevalim Do you mind commenting as to why we have the bin file in both the railties gem and the rails gem? Maybe if we get to the bottom of that, we can get the rubygems team to help us out. :(

Jeremy Kemper
Owner

AFAIK:

Added to railties so that gem can be installed independently, without pulling in possibly unwanted AR, etc.

Kept in rails because otherwise invoking rails would use the executable from old 2.3.x gem installs.

Seems safer to simply revert this for now and revisit in the gentler times of some future world.

José Valim
Owner

Yes, JK is correct. The issue was to avoid people having the rails 2.3.x being used in case they installed Rails 2.3.x after installing 3.x.

Now that rubygems has the overriding warning, maybe we can finally remove it from the rails gem and leave it permanently in the railties. It means people will now be aware when installing an older rails version that their bin stuff is being overwritten.

Alex Chaffee

Looks like rubygems took out the warning. I think to be safe you need to have the executable in both gems. :-(

See #2400

Please sign in to comment.
Something went wrong with that request. Please try again.