upgrade(rails 5): no longer use rake to invoke rake tasks, use rails
though I left the case alone where the command would previously been just `bundle exec rake`, as doing the same doesn't work for rails.
This commit is contained in:
@@ -42,7 +42,7 @@ $ gem install bundler
|
||||
Initialize the database:
|
||||
|
||||
```bash
|
||||
$ rake db:setup
|
||||
$ rails db:setup
|
||||
```
|
||||
|
||||
Start the Thin web server:
|
||||
@@ -78,7 +78,7 @@ To run Railsgoat with Docker you must first have [Docker](https://docs.docker.co
|
||||
```
|
||||
#~/code/railsgoat
|
||||
$ docker-compose build
|
||||
$ docker-compose run web rake db:setup
|
||||
$ docker-compose run web rails db:setup
|
||||
$ docker-compose up
|
||||
...
|
||||
Creating railsgoat_web_1
|
||||
@@ -103,16 +103,16 @@ In this case, remove that server.pid file and try again. Note also that this fil
|
||||
|
||||
## Capybara Tests
|
||||
|
||||
RailsGoat now includes a set of failing Capybara RSpecs, each one indicating that a separate vulnerability exists in the application. To run them, you first need to install [PhantomJS](https://github.com/jonleighton/poltergeist#installing-phantomjs) (version 2.1.1 has been tested in Dev and on Travis CI), which is required by the Poltergeist Capybara driver. Upon installation, simply run the following rake task:
|
||||
RailsGoat now includes a set of failing Capybara RSpecs, each one indicating that a separate vulnerability exists in the application. To run them, you first need to install [PhantomJS](https://github.com/jonleighton/poltergeist#installing-phantomjs) (version 2.1.1 has been tested in Dev and on Travis CI), which is required by the Poltergeist Capybara driver. Upon installation, simply run the following task:
|
||||
|
||||
```
|
||||
$ rake training
|
||||
$ rails training
|
||||
```
|
||||
|
||||
To run just one spec:
|
||||
|
||||
```
|
||||
$ rake training SPEC=spec/vulnerabilities/sql_injection_spec.rb
|
||||
$ rails training SPEC=spec/vulnerabilities/sql_injection_spec.rb
|
||||
```
|
||||
|
||||
NOTE: As vulnerabilities are fixed in the application, these specs will not change to `passing`, but to `pending`.
|
||||
@@ -124,10 +124,10 @@ By default in development mode Railsgoat runs with a SQLite database. There is a
|
||||
|
||||
```
|
||||
#Create the MySQL database
|
||||
RAILS_ENV=mysql rake db:create
|
||||
RAILS_ENV=mysql rails db:create
|
||||
|
||||
#Run the migrations against the database
|
||||
RAILS_ENV=mysql rake db:migrate
|
||||
RAILS_ENV=mysql rails db:migrate
|
||||
|
||||
#Boot Rails using MySQl
|
||||
RAILS_ENV=mysql rails s
|
||||
@@ -137,9 +137,10 @@ RAILS_ENV=mysql rails s
|
||||
|
||||
In order for RailsGoat to effectively process email, you will first need to run MailCatcher, an SMTP server that will intercept email messages and display them in a web interface.
|
||||
|
||||
To start an instance of MailCatcher, simply run:
|
||||
Mailcatcher is not installed by default. To install MailCatcher and start an instance of it, simply run:
|
||||
|
||||
```
|
||||
$ gem install mailcatcher
|
||||
$ mailcatcher
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user