diff options
author | Oscar Del Ben <info@oscardelben.com> | 2012-05-22 08:43:14 -0700 |
---|---|---|
committer | Oscar Del Ben <info@oscardelben.com> | 2012-05-22 08:43:14 -0700 |
commit | 987a74da23b7ef28a9564f20a3bf87b26530fa2f (patch) | |
tree | 1c1ec33559d475739abf60ec947552e5d3c7a7b4 /guides | |
parent | d4d87941cbf4d8204c8d3ac6f4a87c29e42445b0 (diff) | |
download | rails-987a74da23b7ef28a9564f20a3bf87b26530fa2f.tar.gz rails-987a74da23b7ef28a9564f20a3bf87b26530fa2f.tar.bz2 rails-987a74da23b7ef28a9564f20a3bf87b26530fa2f.zip |
[Guides] Review bin/rails section
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/initialization.textile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/guides/source/initialization.textile b/guides/source/initialization.textile index 5ffa62fd67..a1420d3b6a 100644 --- a/guides/source/initialization.textile +++ b/guides/source/initialization.textile @@ -47,7 +47,7 @@ require 'rails/script_rails_loader' Rails::ScriptRailsLoader.exec_script_rails! require 'rails/ruby_version_check' -Signal.trap("INT") { puts; exit } +Signal.trap("INT") { puts; exit(1) } if ARGV.first == 'plugin' ARGV.shift @@ -57,7 +57,7 @@ else end </ruby> -The +rbconfig+ file from the Ruby standard library provides us with the +RbConfig+ class which contains detailed information about the Ruby environment, including how Ruby was compiled. We can see this in use in +railties/lib/rails/script_rails_loader+. +The +rbconfig+ file from the Ruby standard library provides us with the +RbConfig+ class which contains detailed information about the Ruby environment, including how Ruby was compiled. We can see thisin use in +railties/lib/rails/script_rails_loader+. <ruby> require 'pathname' @@ -121,6 +121,9 @@ exec RUBY, SCRIPT_RAILS, *ARGV if in_rails_application? This is effectively the same as running +ruby script/rails [arguments]+, where +[arguments]+ at this point in time is simply "server". +TIP: If you execute +script/rails+ directly from your Rails app you will +avoid executing the code that we just described. + h4. +script/rails+ This file is as follows: |