Changed $PWD to work on windows and linux/mac. (#437)

This commit is contained in:
Travis Reeder
2017-01-02 12:24:17 -08:00
committed by GitHub
parent 538f43745b
commit 9f19611e97
4 changed files with 7 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ This example will show you how to test and deploy a Ruby function to IronFunctio
# create your func.yaml file
fn init <YOUR_DOCKERHUB_USERNAME>/hello
# install dependencies, we need the json gem to run this
docker run --rm -v "$PWD":/worker -w /worker iron/ruby:dev bundle install --standalone --clean
docker run --rm -it -v ${pwd}:/worker -w /worker iron/ruby:dev bundle install --standalone --clean
# build the function
fn build
# test it
@@ -24,7 +24,7 @@ Now surf to: http://localhost:8080/r/myapp/hello
Create a [Gemfile](http://bundler.io/gemfile.html) file in your function directory, then run:
```sh
docker run --rm -v "$PWD":/worker -w /worker iron/ruby:dev bundle install --standalone --clean
docker run --rm -it -v ${pwd}:/worker -w /worker iron/ruby:dev bundle install --standalone --clean
```
Ruby doesn't pick up the gems automatically, so you'll have to add this to the top of your `func.rb` file:
@@ -38,7 +38,7 @@ Open `func.rb` to see it in action.
To update dependencies:
```sh
docker run --rm -v "$PWD":/worker -w /worker iron/ruby:dev bundle update
docker run --rm -it -v ${pwd}:/worker -w /worker iron/ruby:dev bundle update
# then install again to vendor them
docker run --rm -v "$PWD":/worker -w /worker iron/ruby:dev bundle update
docker run --rm -it -v ${pwd}:/worker -w /worker iron/ruby:dev bundle update
```