fhir-crucible / crucible_smart_app

Crucible SMART-on-FHIR Testing App
Apache License 2.0
8 stars 2 forks source link

Installation Issue #91

Open johnrsnyder opened 6 years ago

johnrsnyder commented 6 years ago

On Windows as many of the ATL's will want to use Windows; error resolving the bundle--here is the salient log out: ... Using docile 1.1.5 Fetching unf_ext 0.0.7.4 (x86-mingw32) Installing unf_ext 0.0.7.4 (x86-mingw32) Gem::RuntimeRequirementNotMetError: unf_ext requires Ruby version < 2.5, >= 2.0.

The current ruby version is 2.5.0. An error occurred while installing unf_ext (0.0.7.4), and Bundler cannot continue. Make sure that gem install unf_ext -v '0.0.7.4' succeeds before bundling.

In Gemfile: fhir_client was resolved to 3.0.2, which depends on rest-client was resolved to 2.0.2, which depends on http-cookie was resolved to 1.0.3, which depends on domain_name was resolved to 0.5.20170404, which depends on unf was resolved to 0.1.4, which depends on unf_ext

C:\GitHub\crucible_smart_app>gem install unf_ext -v '0.0.7.4 ERROR: Error installing unf_ext: The last version of unf_ext (= 0.0.7.4) to support your Ruby & RubyGems was 0.0.7.4. Try installing it with gem install unf_ext -v 0.0.7.4 unf_ext requires Ruby version < 2.5, >= 2.0. The current ruby version is 2.5.0.

arscan commented 6 years ago

It looks like one of the dependencies needed to be upgraded to support Ruby 2.5 (on Windows specifically), which was released in December. I just updated the gem dependencies and pushed an update to master, so if you update that and try bundle install again it should work. I was able to get the self-tests to run (bundle exec rake), and the site to launch (bundle exec ruby app.rb), but was having some issues running tests. It either has to do with EventMachine support on Windows in Ruby 2.4 and 2.5, or SSL support.

@aviars is looking at options for local installations and deployments. We had discussed packaging this up in an AMI, or providing a Docker package, both of which would allow users to just run it using a preconfigured container. Running this in Windows natively should be possible, but the installation instructions may be lengthy compared to Linux and MacOS.

johnrsnyder commented 6 years ago

Yes that issue is fixed, thank you. Now I have another problem with the do_sqlite3 loading but let me look at that as it is a local setup issue.

arscan commented 6 years ago

I got stuck on that as well yesterday. If you are using RubyInstaller, I think running this command helped me get things working (from https://github.com/oneclick/rubyinstaller2#install-gems-with-c-extensions-and-additional-library-dependencies):

ridk exec pacman -S mingw-w64-x86_64-sqlite3
gem install sqlite3 --platform ruby

Or if you are using the 32 bit version

ridk exec pacman -S mingw-w64-i686-sqlite3
gem install sqlite3 --platform ruby
johnrsnyder commented 6 years ago

Getting back around to this: I ran the ridk w/o any errors and the bundle install completes w/o errors. "Using do_sqlite3 0.10.17 (x86-mingw32)..."

However I get this error when I try to run the program: "C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/do_sqlite3-0.10.17-x86-mingw32/lib/do_sqlite3.rb:32:in `require': cannot load such file -- do_sqlite3/2.5/do_sqlite3 (LoadError)"

I do not have a directory "2.5" under "...\gems\do_sqlite3-0.10.17-x86-mingw32\lib\do_sqlite3"

Any ideas on that?

aviars commented 6 years ago

@johnrsnyder Why not use a virtual machine of Ubuntu instead? This will greatly simplify setup. Discuss by phone?

johnrsnyder commented 6 years ago

I'm sure that the Testing Labs will want to run this app on Windows, so I am looking ahead. Might as well bite the bullet now...

aviars commented 6 years ago

@johnrsnyder ok roger that. Is SQLite and related libraries installed? Can you send me your notes for install if you have any? I will add those to the documentation.

johnrsnyder commented 6 years ago

I just downloaded the "sqlite-tools-win32-x86-3220000.zip" file and put it in a folder, added the folder to the PATH variable; that is largely irrelevant to the ruby issue I think. See the above that the program wants to load from a "2.5" under "...\gems\do_sqlite3-0.10.17-x86-mingw32\lib\do_sqlite3"

However the Ruby runtime does not provide such a folder...I have a "2.3" folder in this library.

aviars commented 6 years ago

Cygwin? https://www.cygwin.com/

aviars commented 6 years ago

@johnrsnyder Perhaps Docker is another way to set this up on Windows?

johnrsnyder commented 6 years ago

I think all that is necessary is to roll-back to the 2.3 version of the \gems\do_sqlite3-0.10.17-x86-mingw32\lib\do_sqlite3 so that the Windows clients will work?

jricher commented 6 years ago

If you're able to use Docker on a windows host, we've just supplied Docker support for the application in #105. To use it, after installing Docker, run docker-compose up in the project directory.

aviars commented 6 years ago

@johnrsnyder Here is a link to some instructions. https://github.com/fhir-crucible/crucible_smart_app/blob/master/deployment-configuration.md#docker-configuration

We could also use Virtualbox too, but its not really necessary if you can use Docker or are using Windows 10 Pro. Windows 10 Pro will allow you to run Ubuntu within it.