pophealth / popHealth

popHealth - An Open Source Population Health Reporting Prototype
http://projectpophealth.org
Apache License 2.0
126 stars 154 forks source link

PopHealth in Docker issue #280

Open sylvesterjakubowski opened 6 years ago

sylvesterjakubowski commented 6 years ago
ActionView::Template::Error (couldn't find file 'jquery/jquery' with type 'application/javascript'
Checked in these paths: 
  /popHealth/app/assets/fonts
  /popHealth/app/assets/images
  /popHealth/app/assets/javascripts
  /popHealth/app/assets/stylesheets
  /popHealth/lib/assets/javascripts
  /popHealth/vendor/assets/components
  /usr/local/rvm/gems/ruby-2.2.5/gems/handlebars_assets-0.23.1/vendor/assets/javascripts
  /usr/local/rvm/gems/ruby-2.2.5/gems/select2-rails-4.0.3/vendor/assets/javascripts
  /usr/local/rvm/gems/ruby-2.2.5/gems/select2-rails-4.0.3/vendor/assets/stylesheets
  /usr/local/rvm/gems/ruby-2.2.5/gems/jquery-ui-rails-5.0.5/app/assets/images
  /usr/local/rvm/gems/ruby-2.2.5/gems/jquery-ui-rails-5.0.5/app/assets/javascripts
  /usr/local/rvm/gems/ruby-2.2.5/gems/jquery-ui-rails-5.0.5/app/assets/stylesheets
  /usr/local/rvm/gems/ruby-2.2.5/gems/jquery-datatables-rails-3.3.0/app/assets/images
  /usr/local/rvm/gems/ruby-2.2.5/gems/jquery-datatables-rails-3.3.0/app/assets/javascripts
  /usr/local/rvm/gems/ruby-2.2.5/gems/jquery-datatables-rails-3.3.0/app/assets/media
  /usr/local/rvm/gems/ruby-2.2.5/gems/jquery-datatables-rails-3.3.0/app/assets/stylesheets
  /usr/local/rvm/gems/ruby-2.2.5/gems/bootstrap-datepicker-rails-1.3.0.2/vendor/assets/javascripts
  /usr/local/rvm/gems/ruby-2.2.5/gems/bootstrap-datepicker-rails-1.3.0.2/vendor/assets/stylesheets
  /usr/local/rvm/gems/ruby-2.2.5/gems/jquery-rails-4.3.1/vendor/assets/javascripts
  /usr/local/rvm/gems/ruby-2.2.5/gems/coffee-rails-4.2.2/lib/assets/javascripts
  /usr/local/rvm/gems/ruby-2.2.5/gems/formtastic-3.1.5/app/assets/stylesheets
  /usr/local/rvm/gems/ruby-2.2.5/gems/hquery-patient-api-1.0.4/app/assets/javascripts
  /popHealth/spec/javascripts
  /usr/local/rvm/gems/ruby-2.2.5/gems/bootstrap-sass-3.3.7/assets/stylesheets
  /usr/local/rvm/gems/ruby-2.2.5/gems/bootstrap-sass-3.3.7/assets/javascripts
  /usr/local/rvm/gems/ruby-2.2.5/gems/bootstrap-sass-3.3.7/assets/fonts
  /usr/local/rvm/gems/ruby-2.2.5/gems/bootstrap-sass-3.3.7/assets/images):
    1: 
    2: <div class="login">
    3:   <header>
    4:       <%= image_tag "pophealth_welcome.png", :id => 'imgLogo', :title => 'popHealth welcomes you!', :alt => 'popHealth logo' %>
    5:     <%= content_tag(:div, flash[:error], id: "flash_error", class: "alert alert-error") if flash[:error] %>
    6:     <%= content_tag(:div, flash[:notice], id: "flash_notice", class: "alert alert-info") if flash[:notice] %>
    7:     <%= content_tag(:div, flash[:alert], id: "flash_alert", class: "alert alert-warning") if flash[:alert] %>
  app/assets/javascripts/application.js.coffee:1
  app/views/devise/sessions/new.html.erb:4:in `_app_views_devise_sessions_new_html_erb__578156647834078542_46911540'

Following: https://stackoverflow.com/questions/31102282/couldnt-find-file-jquery-with-type-application-javascript to debug and none of the options seem to be working.

I made the following tweaks to : https://gist.github.com/cjohnsonal/ed3e60ed56eda4a16e58

diff --git a/Dockerfile b/Dockerfile
index a42f31e..ecedfa6 100755
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,10 +15,10 @@ RUN curl -sSL get.rvm.io | sudo bash -l -s stable

 #Install Ruby & Bundler
 ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rvm/scripts/rvm
-RUN /bin/bash -l -c "rvm autolibs enable; rvm install 2.1.2; rvm --default 2.1.2"
-RUN /bin/bash -l -c "gem install bundler -v '1.7.2' --no-ri --no-rdoc"
+RUN /bin/bash -l -c "rvm autolibs enable; rvm install 2.2.5; rvm --default 2.2.5"
+RUN /bin/bash -l -c "gem install bundler -v '1.14.6' --no-ri --no-rdoc"
 ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/rvm/scripts/rvm:/etc/profile.d/rvm.sh
-RUN /bin/bash -l -c "rvm use 2.1.2; rvm --default 2.1.2"
+RUN /bin/bash -l -c "rvm use 2.2.5; rvm --default 2.2.5"

 #MongoDB
 RUN sh -c "echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' >> /etc/apt/sources.list.d/mongo.list"
@@ -45,4 +45,4 @@ RUN mkdir -p /data/db
 #VOLUME /Mongo

 #Set default run point
-ENTRYPOINT exec "/popHealth/pop_init.sh"
\ No newline at end of file
+ENTRYPOINT exec "/popHealth/pop_init.sh"
diff --git a/pop_init.sh b/pop_init.sh
index ac54423..503ecb5 100755
--- a/pop_init.sh
+++ b/pop_init.sh
@@ -11,4 +11,10 @@ mongod &
 echo "Adding Admin Account"
 bundle exec rake admin:create_admin_account RAILS_ENV=development
 echo "Downloading Bundle"
-bundle exec rake pophealth:download_update_install version=2.6.0 RAILS_ENV=development
\ No newline at end of file
+bundle exec rake pophealth:download_update_install version=2.6.0 RAILS_ENV=development
+echo "Installing bundle"
+bundle install
+echo "Initializing Background Tasks"
+bundle exec rake jobs:work RAILS_ENV=development &
+echo "Initializing Server"
+bundle exec rails s -p 8000 -b 0.0.0.0

To resolve a number of issues, any suggestions?

Thanks & Merry Christmas.