From 47829f076f281022fbe0679683a7b1b2bcb0dd95 Mon Sep 17 00:00:00 2001 From: Decklin Foster Date: Fri, 6 Jan 2017 12:39:00 -0500 Subject: [PATCH] Keep vm.rb and canonical instructions for it in this repo --- README.md | 6 ++++++ vm.rb | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 vm.rb diff --git a/README.md b/README.md index 5f3c60f..ffb5a5b 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,12 @@ There are a few extra scripts in the VM that you can use during the workshop: * `showargs` can be used to explain how command-line arguments work. * `vagrant` prints a message explaining that you're in the VM and should exit if you want to run a Vagrant command. +## Additional Files + +Some files are not installed in the VM: + +* `vm.rb`: this is a Rails application template that students can apply to their app so that they don't have to pass `-b 0.0.0.0` to `rails server`. Copy it to the downloads site alongside the VM images, and have students apply it with `rake rails:template LOCATION=http://downloads.railsbridge.org/vm.rb`. + ## Tests TODO: There should be some kind of automated test for the output (i.e. can you start the VM, log in, clone a test Rails app, and run it). diff --git a/vm.rb b/vm.rb new file mode 100644 index 0000000..12dd96f --- /dev/null +++ b/vm.rb @@ -0,0 +1,22 @@ +# RailsBridge VM application template for running inside VirtualBox +# +# The VirtualBox NAT interface (which connects the guest to the host) is +# probably 10.0.2.15, but just in case something changes in the future, +# listen on all interfaces, and whitelist all 10.* networks. + +environment "config.web_console.whitelisted_ips = '10.0.0.0/8'", env: 'development' + +append_file 'config/boot.rb', <