Closed jgaskins closed 6 years ago
@jgaskins what's the status with this?
It's good to go. I'm not sure why one of the builds is failing. I addressed the failure in 584f1f8 in this PR.
OK @jgaskins I don't want to merge the code that breaks the build. When you have a chance can you take a look at it please? @bkemper did you ever look at the code?
That's what I meant by addressing the failure:
I addressed the failure in 584f1f8 in this PR.
The failure in CI:
$ RAILS_ENV=development rake db:setup db:drop
rake aborted!
Gem::LoadError: You have already activated rake 12.0.0, but your Gemfile requires rake 12.1.0. Prepending `bundle exec` to your command may solve this.
The fix is already in this PR. Gem version mismatches are due to the build server running a different version of Rake than we have in our Gemfile — the rake
command loads the rake
gem, and then when Rails loads rake
through config/application.rb
, it's a different version. The fix is to run the rake
command through bundle exec
, as I did in this PR.
While pairing with @Elishebawiggins on her Cloud9 VM, we noticed a lot of extra work had to be done to get things working there:
webpack-dev-server
runs on 8080, but C9 expects 8080 to be the main web app<script src>
URL, butwebpack-dev-server
needed to bind to0.0.0.0
(not a hostname) and they use the same config optionA solution we discussed was to use
foreman
, but apparently webpacker 1.2 doesn't let us use environment variables in the YAML config the waydatabase.yml
does. Unfortunately, the webpack host needed to be dynamic.This PR is the best solution I could find — it's basically just an upgrade of
webpacker
and some tweaked default config options. I created an account on Cloud9 to verify this branch works there (and added some workarounds to theREADME
for things that didn't "just work") as well as deleted the entire app (DB and all) from my local machine to verify it works from scratch locally, too.But once the instructions in the README were followed,
rails s
is all that's needed to run this both locally and on Cloud9. No separatewebpack-dev-server
process (I mean, I'm sure it runs, but Rails handles it and we don't need to care about it).