From 286259f2aaf2fb83a886061a4a70e3c9cb22fd42 Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Tue, 27 Mar 2012 21:08:08 +0530 Subject: Revert "[ci skip] updated bin/rails code in Rails Initialization Process guide" This reverts commit 7feec40b89ada892ca6f107ada27ceedde505d83. Reason: The guide had the contents of railties/bin/rails and I don't see any reason to change it. --- guides/source/initialization.textile | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'guides/source') diff --git a/guides/source/initialization.textile b/guides/source/initialization.textile index b5e427b35c..69e5c1edcc 100644 --- a/guides/source/initialization.textile +++ b/guides/source/initialization.textile @@ -21,24 +21,14 @@ The actual +rails+ command is kept in _bin/rails_: #!/usr/bin/env ruby -# -# This file was generated by RubyGems. -# -# The application 'railties' 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 +begin + require "rails/cli" +rescue LoadError + railties_path = File.expand_path('../../railties/lib', __FILE__) + $:.unshift(railties_path) + require "rails/cli" end - -gem 'railties', version -load Gem.bin_path('railties', 'rails', version) This file will attempt to load +rails/cli+. If it cannot find it then +railties/lib+ is added to the load path (+$:+) before retrying. -- cgit v1.2.3