Skip to content

Instantly share code, notes, and snippets.

@meatherly
Created July 28, 2015 14:59
Show Gist options
  • Save meatherly/08084be21c8259955cfe to your computer and use it in GitHub Desktop.
Save meatherly/08084be21c8259955cfe to your computer and use it in GitHub Desktop.
Vagrant Phoenix set up
=> default: * creating /root/.mix/archives/hex.ez
==> default: Failed to open Hex registry file
==> default: Failed to open Hex registry file
==> default: Failed to open Hex registry file
==> default: Failed to open Hex registry file
==> default: Failed to open Hex registry file
==> default: Failed to open Hex registry file
==> default: ==> phoenix_html
==> default: Compiled lib/phoenix_html/engine.ex
==> default: Compiled lib/phoenix_html.ex
==> default: Compiled lib/phoenix_html/safe.ex
==> default:
==> default: == Compilation error on file lib/phoenix_html/form_data.ex ==
==> default: ** (CompileError) lib/phoenix_html/form_data.ex:22: Phoenix.HTML.Form.__struct__/0 is undefined, cannot expand struct Phoenix.HTML.Form
==> default:     (elixir) src/elixir_map.erl:55: :elixir_map.translate_struct/4
==> default:     (elixir) src/elixir_clauses.erl:36: :elixir_clauses.clause/7
==> default:     (elixir) src/elixir_def.erl:178: :elixir_def.translate_clause/7
==> default:     (elixir) src/elixir_def.erl:167: :elixir_def.translate_definition/8
==> default:     (elixir) src/elixir_def.erl:82: :elixir_def.store_definition/9
==> default:
==> default: == Compilation error on file lib/phoenix_html/form.ex ==
==> default: ** (CompileError) lib/phoenix_html/form.ex:90: module Phoenix.HTML.Tag is not loaded and could not be found
==> default:     (stdlib) lists.erl:1353: :lists.mapfoldl/3
==> default:     (stdlib) lists.erl:1354: :lists.mapfoldl/3
==> default:
==> default: == Compilation error on file lib/phoenix_html/tag.ex ==
==> default: ** (CompileError) lib/phoenix_html/tag.ex:7: module Plug.CSRFProtection is not loaded and could not be found
==> default:     (stdlib) lists.erl:1353: :lists.mapfoldl/3
==> default:     (stdlib) lists.erl:1354: :lists.mapfoldl/3
==> default:
==> default: == Compilation error on file lib/phoenix_html/link.ex ==
==> default: ** (CompileError) lib/phoenix_html/link.ex:6: module Phoenix.HTML.Tag is not loaded and could not be found
==> default:     (stdlib) lists.erl:1353: :lists.mapfoldl/3
==> default:     (stdlib) lists.erl:1354: :lists.mapfoldl/3
==> default: could not compile dependency phoenix_html, mix compile failed. You can recompile this dependency with `mix deps.compile phoenix_html` or update it with `mix deps.update phoenix_html`
==> default: Failed to open Hex registry file
==> default: Failed to open Hex registry file
==> default: Failed to open Hex registry file
==> default: Failed to open Hex registry file
==> default: Failed to open Hex registry file
==> default: Failed to open Hex registry file
==> default:
==> default: == Compilation error on file lib/phoenix_live_reload/frame.ex ==
==> default: ** (CompileError) lib/phoenix_live_reload/frame.ex:2: module Plug.Conn is not loaded and could not be found
==> default:     (stdlib) lists.erl:1353: :lists.mapfoldl/3
==> default:
==> default: == Compilation error on file lib/phoenix_live_reload/live_reloader.ex ==
==> default: ** (CompileError) lib/phoenix_live_reload/live_reloader.ex:2: module Phoenix.Router is not loaded and could not be found
==> default:     (elixir) expanding macro: Kernel.use/1
==> default:     lib/phoenix_live_reload/live_reloader.ex:2: Phoenix.LiveReloader (module)
==> default:     (elixir) lib/kernel/parallel_compiler.ex:97: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/8
==> default:
==> default: == Compilation error on file lib/phoenix_live_reload/channel.ex ==
==> default: ** (CompileError) lib/phoenix_live_reload/channel.ex:2: module Phoenix.Channel is not loaded and could not be found
==> default:     (elixir) expanding macro: Kernel.use/1
==> default:     lib/phoenix_live_reload/channel.ex:2: Phoenix.LiveReload.Channel (module)
==> default:     (elixir) lib/kernel/parallel_compiler.ex:97: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/8
==> default: ==> phoenix_live_reload
==> default: could not compile dependency phoenix_live_reload, mix compile failed. You can recompile this dependency with `mix deps.compile phoenix_live_reload` or update it with `mix deps.update phoenix_live_reload`
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 4000, host: 4000
config.vm.synced_folder "./address_book", "/home/vagrant"
config.vm.provision "shell", inline: <<-SHELL
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install -y elixir
sudo su - vagrant
cd /vagrant/address_book
mix local.hex --force
mix deps.compile phoenix_html
mix phoenix.server
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment