Skip to content

Instantly share code, notes, and snippets.

@MyklClason
Last active March 10, 2018 10:20
Show Gist options
  • Save MyklClason/de426824a19192619d3edc05b32d5dd3 to your computer and use it in GitHub Desktop.
Save MyklClason/de426824a19192619d3edc05b32d5dd3 to your computer and use it in GitHub Desktop.
Rails + Elm + Cloud9: Basic setup instructions

Setup Instructions

  1. Upgrade Rails to 5.1+ for webpacker integration
  2. Run nvm install node && nvm alias default stable to use latest version of node.
  3. Install Yarn
  4. Add webpack-dev-server and configure as below.
  5. Run rails new elm_on_rails --webpack
  6. Run rails webpacker:install if needed.
  7. Run rails webpacker:install:elm
  8. Add <%= javascript_pack_tag "javascript_filename_without_extension" %> to an html view.

Webpack Dev Server configuration

  dev_server:
    https: true
    host: localhost
    port: 8082
    public: rails-and-elm-myklclason.c9users.io/:8082
    hmr: false
    inline: false
    overlay: true
    disable_host_check: true
    use_local_ip: false

Replace from dev_server to use_local_ip only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment