Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.

Commit 816879e

Browse files
committed
update README
1 parent 522382b commit 816879e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,24 @@ $ rails g gor development
7272

7373
here we use the `development` environment to generate a `go_app` directory in our Rails project root.
7474

75-
and don't forget to install Go packages our app depends:
75+
and don't forget to install Go packages our app depends on by running a predefined Rake task:
7676

7777
```bash
7878
$ rails gor:deps
7979
```
8080

81+
and we also need some other Go packages in this example, we can install them in advance:
82+
83+
```bash
84+
go get github.com/bitly/go-simplejson
85+
go get github.com/goonr/gorails/...
86+
```
87+
8188
### Create a controller to read Rails session
8289

8390
Now we'll write an API to read Rails session. First let's create a contoller as `go_app/controllers/sessions_controller.go`.
8491

85-
And here we use a package [gorails](https://github.com/goonr/gorails) to read the session. Please check the [sessions_controller](https://github.com/goonr/example_read_rails_session/blob/master/go_app/controllers/sessions_controller.go) for the details. We can install it by `go get github.com/goonr/gorails`.
92+
And here we use a package [gorails](https://github.com/goonr/gorails) to read the session. Please check the [sessions_controller](https://github.com/goonr/example_read_rails_session/blob/master/go_app/controllers/sessions_controller.go) for the details.
8693

8794
After set a route in the `main.go`, we can set up our Go server to read the Rails session:
8895

0 commit comments

Comments
 (0)