Skip to content

Commit 9686663

Browse files
committed
Change remaining rake commands to rails
Mostly `rake db:migrate` and `rake routes`. Fixes #590
1 parent e0cbc90 commit 9686663

File tree

9 files changed

+16
-19
lines changed

9 files changed

+16
-19
lines changed

sites/en/installfest/deploy_a_rails_app.step

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ step "Deploy your app to Heroku" do
153153

154154
message "This process will probably take about twice as long as your 'bundle install' and then will return you to your console prompt. If it takes longer than that, talk to a TA."
155155

156-
console "heroku run rake db:migrate"
156+
console "heroku run rails db:migrate"
157157

158158
result <<-OUTPUT
159159
Migrating to CreateDrinks (20160706063236)

sites/en/intro-to-rails/_deploying_to_heroku_again.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ step "Push changes to Heroku" do
1717
end
1818

1919
step "Run database migrations on Heroku" do
20-
console "heroku run rake db:migrate"
20+
console "heroku run rails db:migrate"
2121
message "This tells Heroku to run your migrations on its database, like
22-
running `rake db:migrate` locally."
22+
running `rails db:migrate` locally."
2323
message "Heroku's database is separate from the one on your computer, which
2424
means it needs to be updated every time you make changes to the structure of
2525
your database."

sites/en/intro-to-rails/allow_people_to_vote.step

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ steps {
3838
RUBY
3939

4040
message <<-MARKDOWN
41-
Verify that upvote route was added successfully by checking the output of `rake routes` or [http://localhost:3000/rails/info](http://localhost:3000/rails/info). You should see a line that looks like this:
41+
Verify that upvote route was added successfully by checking the output of `rails routes` or [http://localhost:3000/rails/info](http://localhost:3000/rails/info). You should see a line that looks like this:
4242

4343
```
4444
Prefix Verb URI Pattern Controller#Action

sites/en/intro-to-rails/creating_a_migration.step

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,19 @@ steps {
2525
}
2626

2727
step {
28-
console "rake db:migrate"
28+
console "rails db:migrate"
2929
message "This tells Rails to update the database to include a table for our new model."
3030
}
3131
}
3232

3333
explanation {
3434

35-
h2 "Rake"
3635
message <<-MARKDOWN
37-
`rake` (**r**uby m**ake**) is a tool that allows you to run small Ruby programs (**tasks**) that you use often in your application.
38-
39-
Here, `rake db:migrate` is a task provided by the Rails framework. It uses the migration file we just created (`db/migrate/201xxxxxxxxxxx_create_topics.rb`) to change the database. Database migration files can be crucial to code collaboration.
36+
Here, `rails db:migrate` is a command provided by the Rails framework. It uses the migration file we just created (`db/migrate/201xxxxxxxxxxx_create_topics.rb`) to change the database. Database migration files can be crucial to code collaboration.
4037

4138
MARKDOWN
4239

43-
tip "You can run `rake -T` to see a list of all the `rake` commands your app currently responds to, along with a short description of each task."
40+
tip "You can run `rails --help` to see a list of all the `rails` commands your app currently responds to, along with a short description of each one."
4441
}
4542

4643

sites/en/intro-to-rails/setting_the_default_page.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ explanation {
4848
possible URLs. To explore the URLs in more detail we can use the
4949
terminal.
5050

51-
At the terminal type `rake routes`. You should get something that
51+
At the terminal type `rails routes`. You should get something that
5252
looks like this:
5353

5454
````
55-
$ rake routes
55+
$ rails routes
5656

5757
Prefix Verb URI Pattern Controller#Action
5858
topics GET /topics(.:format) topics#index

sites/en/intro-to-rails/voting_on_topics.step

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ goals {
1010
steps {
1111
console <<-SHELL
1212
rails generate model vote topic_id:integer
13-
rake db:migrate
13+
rails db:migrate
1414
SHELL
1515
}
1616

sites/en/job-board/store_jobs_in_the_database.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ RUBY
6161

6262
message "Now we need to execute this file, so that the database schema gets updated."
6363

64-
console "rake db:migrate"
64+
console "rails db:migrate"
6565

6666
message <<-MARKDOWN
67-
This uses a utility called rake to run a task called `db:migrate`, which in turn looks through all of your migration files and runs any that haven't already been run at some point in the past.
67+
This tells Rails to run any migration files that haven't already been run at some point in the past.
6868
MARKDOWN
6969

7070
discussion_box "Why do we use migrations?",

sites/en/message-board/commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Create a new [Rails model]
3232

3333
Update the database to match what you have described in your code
3434

35-
rake db:migrate
35+
rails db:migrate
3636

3737
Run the application locally (Ctrl-C to quit)
3838

@@ -44,7 +44,7 @@ Start an interactive Ruby session that knows about your Rails models (type 'exit
4444

4545
Print the routes for your application
4646

47-
rake routes
47+
rails routes
4848

4949
## Browser
5050

sites/en/message-board/install_devise.step

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ discussion do
1616
message <<-MARKDOWN
1717
* What is Devise?
1818
* What files did Devise add to your rails app?
19-
* Someone Who Knows: explain how to read the output of the command `rake routes`. What does it give you? How is it helpful?
19+
* Someone Who Knows: explain how to read the output of the command `rails routes`. What does it give you? How is it helpful?
2020
* How will you add the log out link? What's the syntax for a DELETE action?
2121
* You're going to be editing your application layout to add error messaging. If you haven't already, discuss the relationship between the application layout and all the other views you'll be creating.
2222
MARKDOWN
@@ -36,7 +36,7 @@ message <<-MARKDOWN
3636
* The convention for naming models is to capitalize the first letter, like: User.
3737
* When you run `rails generate devise:install`, you get five instructions for things to configure. 3 & 4 are good to do.
3838
* The routes file goes through many common types of routes in the comments. This is also your friend.
39-
* Devise has some magic that will help you with your logout link. Run `rake routes` and look for a route that helps you sign out.
39+
* Devise has some magic that will help you with your logout link. Run `rails routes` and look for a route that helps you sign out.
4040
* You'll probably want to show the current user's email address only if they are presently signed in, right? Devise has a helper for you.
4141
* Optional: any time you generate a model in rails, you can use Rails Console to look at that model's methods and behavior interactively.
4242
MARKDOWN

0 commit comments

Comments
 (0)