diff --git a/actionmailer/README b/actionmailer/README
index e0e2ee436a0..2a4d507d8a4 100644
--- a/actionmailer/README
+++ b/actionmailer/README
@@ -101,7 +101,7 @@ Example:
This Mailman can be the target for Postfix or other MTAs. In Rails, you would use the runner in the
trivial case like this:
- ./script/runner 'Mailman.receive(STDIN.read)'
+ rails runner 'Mailman.receive(STDIN.read)'
However, invoking Rails in the runner for each mail to be received is very resource intensive. A single
instance of Rails should be run within a daemon if it is going to be utilized to process more than just
diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb
index ec85a20f70b..4e89c1ea0cc 100644
--- a/actionmailer/lib/action_mailer/base.rb
+++ b/actionmailer/lib/action_mailer/base.rb
@@ -9,7 +9,7 @@ module ActionMailer #:nodoc:
#
# To use Action Mailer, you need to create a mailer model.
#
- # $ script/generate mailer Notifier
+ # $ rails generate mailer Notifier
#
# The generated model inherits from ActionMailer::Base. Emails are defined by creating methods
# within the model which are then used to set variables to be used in the mail template, to
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb
index c5630ba2fd2..068d2a25b2c 100644
--- a/activerecord/lib/active_record/migration.rb
+++ b/activerecord/lib/active_record/migration.rb
@@ -107,7 +107,7 @@ module ActiveRecord
# The Rails package has several tools to help create and apply migrations.
#
# To generate a new migration, you can use
- # script/generate migration MyNewMigration
+ # rails generate migration MyNewMigration
#
# where MyNewMigration is the name of your migration. The generator will
# create an empty migration file timestamp_my_new_migration.rb in the db/migrate/
@@ -117,7 +117,7 @@ module ActiveRecord
# MyNewMigration.
#
# There is a special syntactic shortcut to generate migrations that add fields to a table.
- # script/generate migration add_fieldname_to_tablename fieldname:string
+ # rails generate migration add_fieldname_to_tablename fieldname:string
#
# This will generate the file timestamp_add_fieldname_to_tablename, which will look like this:
# class AddFieldnameToTablename < ActiveRecord::Migration
diff --git a/activesupport/lib/active_support/core_ext/kernel/debugger.rb b/activesupport/lib/active_support/core_ext/kernel/debugger.rb
index 59e03e3df7c..22fcc1910b0 100644
--- a/activesupport/lib/active_support/core_ext/kernel/debugger.rb
+++ b/activesupport/lib/active_support/core_ext/kernel/debugger.rb
@@ -1,6 +1,6 @@
module Kernel
unless respond_to?(:debugger)
- # Starts a debugging session if ruby-debug has been loaded (call script/server --debugger to do load it).
+ # Starts a debugging session if ruby-debug has been loaded (call rails server --debugger to do load it).
def debugger
message = "\n***** Debugger requested, but was not available: Start server with --debugger to enable *****\n"
defined?(Rails) ? Rails.logger.info(message) : $stderr.puts(message)
diff --git a/activesupport/lib/active_support/whiny_nil.rb b/activesupport/lib/active_support/whiny_nil.rb
index 4f6ff7d3b57..d600ea48256 100644
--- a/activesupport/lib/active_support/whiny_nil.rb
+++ b/activesupport/lib/active_support/whiny_nil.rb
@@ -11,7 +11,7 @@
# classes in NilClass::WHINERS the error message suggests which could be the
# actual intended class:
#
-# $ script/runner nil.destroy
+# $ rails runner nil.destroy
# ...
# You might have expected an instance of ActiveRecord::Base.
# ...
diff --git a/railties/README b/railties/README
index 64dea89585d..e4de4a5cb2e 100644
--- a/railties/README
+++ b/railties/README
@@ -29,14 +29,14 @@ link:files/vendor/rails/actionpack/README.html.
1. At the command prompt, start a new Rails application using the rails command
and your application name. Ex: rails myapp
-2. Change directory into myapp and start the web server: script/server (run with --help for options)
+2. Change directory into myapp and start the web server: rails server (run with --help for options)
3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!"
4. Follow the guidelines to start developing your application
== Web Servers
-By default, Rails will try to use Mongrel if it's installed when started with script/server, otherwise
+By default, Rails will try to use Mongrel if it's installed when started with rails server, otherwise
Rails will use WEBrick, the webserver that ships with Ruby. But you can also use Rails with a variety of
other web servers.
@@ -45,7 +45,7 @@ suitable for development and deployment of Rails applications. If you have Ruby
getting up and running with mongrel is as easy as: gem install mongrel.
More info at: http://mongrel.rubyforge.org
-Other ruby web servers exist which can run your rails application, however script/server does
+Other ruby web servers exist which can run your rails application, however rails server does
not search for them or start them. These include {Thin}[http://code.macournoyer.com/thin/], {Ebb}[http://ebb.rubyforge.org/], and Apache with {mod_rails}[http://www.modrails.com/].
For production use, often a web/proxy server such as {Apache}[http://apache.org], {Nginx}[http://nginx.net/], {LiteSpeed}[http://litespeedtech.com/], {Lighttpd}[http://www.lighttpd.net/] or {IIS}[http://www.iis.net/] is
@@ -168,22 +168,22 @@ model. Here you'll have all parts of the application configured, just like it is
application is running. You can inspect domain models, change values, and save to the
database. Starting the script without arguments will launch it in the development environment.
-To start the console, just run script/console from the application directory.
+To start the console, just run rails console from the application directory.
Options:
* Passing the -s, --sandbox argument will rollback any modifications made to the database.
* Passing an environment name as an argument will load the corresponding environment.
- Example: script/console production.
+ Example: rails console production.
More information about irb can be found at link:http://www.rubycentral.com/pickaxe/irb.html
== dbconsole
-You can go to the command line of your database directly through script/dbconsole.
+You can go to the command line of your database directly through rails dbconsole.
You would be connected to the database with the credentials defined in database.yml.
Starting the script without arguments will connect you to the development database. Passing an
-argument will connect you to a different database, like script/dbconsole production.
+argument will connect you to a different database, like rails dbconsole production.
Currently works for mysql, postgresql and sqlite.
== Description of Contents
@@ -250,7 +250,7 @@ app/views/layouts
app/helpers
Holds view helpers that should be named like weblogs_helper.rb. These are generated
- for you automatically when using script/generate for controllers. Helpers can be used to
+ for you automatically when using rails generate for controllers. Helpers can be used to
wrap functionality for your views into methods.
config
@@ -277,7 +277,7 @@ script
Helper scripts for automation and generation.
test
- Unit and functional tests along with fixtures. When using the script/generate scripts, template
+ Unit and functional tests along with fixtures. When using the rails generate scripts, template
test files will be generated for you and placed in this directory.
vendor
diff --git a/railties/guides/source/3_0_release_notes.textile b/railties/guides/source/3_0_release_notes.textile
index 5e96f8cf06a..16241721763 100644
--- a/railties/guides/source/3_0_release_notes.textile
+++ b/railties/guides/source/3_0_release_notes.textile
@@ -39,8 +39,8 @@ h4. script/* replaced by script/rails
The new script/rails replaces all the scripts that used to be in the script directory. You do not run script/rails directly though, the +rails+ command detects it is being invoked in the root of a Rails application and runs the script for you. Intended usage is:
-rails console # => ./script/console
-rails g scaffold post title:string # => ./script/generate scaffold post title:string
+rails console # => ./script/rails console
+rails g scaffold post title:string # => ./script/rails generate scaffold post title:string
Run rails --help for a list of all the options.
@@ -557,4 +557,4 @@ h3. Credits
See the "full list of contributors to Rails":http://contributors.rubyonrails.org/ for the many people who spent many hours making Rails 3. Kudos to all of them.
-Rails 3.0 Release Notes were compiled by "Mikel Lindsaar":http://lindsaar.net.
\ No newline at end of file
+Rails 3.0 Release Notes were compiled by "Mikel Lindsaar":http://lindsaar.net.
diff --git a/railties/guides/source/action_mailer_basics.textile b/railties/guides/source/action_mailer_basics.textile
index 2405b8f28c1..941c2e9771c 100644
--- a/railties/guides/source/action_mailer_basics.textile
+++ b/railties/guides/source/action_mailer_basics.textile
@@ -19,7 +19,7 @@ h4. Walkthrough to Generating a Mailer
h5. Create the Mailer
-./script/generate mailer UserMailer
+rails generate mailer UserMailer
create app/mailers/user_mailer.rb
invoke erb
create app/views/user_mailer
@@ -111,7 +111,7 @@ Let's see how we would go about wiring it up using an observer.
First off, we need to create a simple +User+ scaffold:
-$ script/generate scaffold user name:string email:string login:string
+$ rails generate scaffold user name:string email:string login:string
$ rake db:migrate
@@ -333,7 +333,7 @@ Receiving and parsing emails with Action Mailer can be a rather complex endeavou
* Implement a +receive+ method in your mailer.
-* Configure your email server to forward emails from the address(es) you would like your app to receive to +/path/to/app/script/runner 'UserMailer.receive(STDIN.read)'+.
+* Configure your email server to forward emails from the address(es) you would like your app to receive to +/path/to/app/script/rails runner 'UserMailer.receive(STDIN.read)'+.
Once a method called +receive+ is defined in any mailer, Action Mailer will parse the raw incoming email into an email object, decode it, instantiate a new mailer, and pass the email object to the mailer +receive+ instance method. Here's an example:
diff --git a/railties/guides/source/active_support_core_extensions.textile b/railties/guides/source/active_support_core_extensions.textile
index 3073c3a7a50..bf39ed4c9fb 100644
--- a/railties/guides/source/active_support_core_extensions.textile
+++ b/railties/guides/source/active_support_core_extensions.textile
@@ -1805,7 +1805,7 @@ Rails hijacks +LoadError.new+ to return a +MissingSourceFile+ exception:
$ ruby -e 'require "nonexistent"'
...: no such file to load -- nonexistent (LoadError)
...
-$ script/runner 'require "nonexistent"'
+$ rails runner 'require "nonexistent"'
...: no such file to load -- nonexistent (MissingSourceFile)
...
diff --git a/railties/guides/source/activerecord_validations_callbacks.textile b/railties/guides/source/activerecord_validations_callbacks.textile
index 9d0ee29ff2d..dc61021f768 100644
--- a/railties/guides/source/activerecord_validations_callbacks.textile
+++ b/railties/guides/source/activerecord_validations_callbacks.textile
@@ -44,7 +44,7 @@ class Person < ActiveRecord::Base
end
-We can see how it works by looking at some script/console output:
+We can see how it works by looking at some +rails console+ output:
>> p = Person.new(:name => "John Doe")
diff --git a/railties/guides/source/command_line.textile b/railties/guides/source/command_line.textile
index 1a571358a17..a84e9287313 100644
--- a/railties/guides/source/command_line.textile
+++ b/railties/guides/source/command_line.textile
@@ -58,7 +58,7 @@ Without any prodding of any kind, +server+ will run our new shiny Rails app:
$ cd commandsapp
-$ ./script/server
+$ rails server
=> Booting WEBrick...
=> Rails 2.2.0 application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
@@ -76,8 +76,8 @@ h4. +generate+
The +generate+ command uses templates to create a whole lot of things. You can always find out what's available by running +generate+ by itself. Let's do that:
-$ ./script/generate
-Usage: ./script/generate generator [options] [args]
+$ rails generate
+Usage: rails generate generator [options] [args]
...
...
@@ -95,17 +95,17 @@ Using generators will save you a large amount of time by writing *boilerplate co
Let's make our own controller with the controller generator. But what command should we use? Let's ask the generator:
-INFO: All Rails console utilities have help text. As with most *NIX utilities, you can try adding +--help+ or +-h+ to the end, for example +./script/server --help+.
+INFO: All Rails console utilities have help text. As with most *NIX utilities, you can try adding +--help+ or +-h+ to the end, for example +rails server --help+.
-$ ./script/generate controller
-Usage: ./script/generate controller ControllerName [options]
+$ rails generate controller
+Usage: rails generate controller ControllerName [options]
...
...
Example:
- ./script/generate controller CreditCard open debit credit close
+ rails generate controller CreditCard open debit credit close
Credit card controller with URLs like /credit_card/debit.
Controller: app/controllers/credit_card_controller.rb
@@ -114,7 +114,7 @@ Example:
Test: test/functional/credit_card_controller_test.rb
Modules Example:
- ./script/generate controller 'admin/credit_card' suspend late_fee
+ rails generate controller 'admin/credit_card' suspend late_fee
Credit card admin controller with URLs /admin/credit_card/suspend.
Controller: app/controllers/admin/credit_card_controller.rb
@@ -126,7 +126,7 @@ Modules Example:
Ah, the controller generator is expecting parameters in the form of +generate controller ControllerName action1 action2+. Let's make a +Greetings+ controller with an action of *hello*, which will say something nice to us.
-$ ./script/generate controller Greetings hello
+$ rails generate controller Greetings hello
exists app/controllers/
exists app/helpers/
create app/views/greetings
@@ -157,10 +157,10 @@ Then the view, to display our nice message (in +app/views/greetings/hello.html.e
<%= @message %>