Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Guidance #83

Closed
johnrsnyder opened this issue Mar 5, 2018 · 5 comments
Closed

Installation Guidance #83

johnrsnyder opened this issue Mar 5, 2018 · 5 comments

Comments

@johnrsnyder
Copy link

Looking ahead, I thought I would give a Windows installation a try (someone had to do it:) I was able to do the "bundle install" w/o any errors, but when I invoke the "bundle exec rake fhir:console" I get a status "127" error which generally points to something not found, I believe.

Can you please add a listing of prerequisites into the readme, or create a separate installation guide for the run-time? Consider that many will want to run the client from Windows, so it would be great to know what prerequisites are necessary to run from a Windows environment.

@jawalonoski
Copy link
Member

Can you copy and paste the exact error you're seeing the Windows Command Prompt (or whatever tool you're using)?

@johnrsnyder
Copy link
Author

Here are the gory details:

C:\GitHub\fhir_client>bundle exec rake fhir:console --trace
** Invoke fhir:console (first_time)
** Execute fhir:console
bin/console
rake aborted!
Command failed with status (127): [bin/console...]
C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/file_utils.rb:66:in block in create_shell_runner' C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/file_utils.rb:57:in sh'
C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/file_utils_ext.rb:37:in sh' lib/fhir_client/tasks/tasks.rake:7:in block (2 levels) in <top (required)>'
C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/task.rb:240:in block in execute' C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/task.rb:235:in each'
C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/task.rb:235:in execute' C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/task.rb:179:in block in invoke_with_call_chain'
C:/apps/Ruby25/lib/ruby/2.5.0/monitor.rb:226:in mon_synchronize' C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/task.rb:172:in invoke_with_call_chain'
C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/task.rb:165:in invoke' C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/application.rb:150:in invoke_task'
C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/application.rb:106:in block (2 levels) in top_level' C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/application.rb:106:in each'
C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/application.rb:106:in block in top_level' C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/application.rb:115:in run_with_threads'
C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/application.rb:100:in top_level' C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/application.rb:78:in block in run'
C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/application.rb:176:in standard_exception_handling' C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/lib/rake/application.rb:75:in run'
C:/apps/Ruby25/lib/ruby/gems/2.5.0/gems/rake-10.5.0/bin/rake:33:in <top (required)>' C:/apps/Ruby25/bin/rake:23:in load'
C:/apps/Ruby25/bin/rake:23:in `

'
Tasks: TOP => fhir:console

C:\GitHub\fhir_client>

@jawalonoski
Copy link
Member

Ah. Well, the issue is Windows doesn't have a sh command:

  task :console, [] do
    sh 'bin/console'
  end

So, the short-term workaround is probably to run the program:

> .\bin\console

or possibly

> ruby .\bin\console

I say probably, because I don't have access to Windows.

@jawalonoski
Copy link
Member

Another option, change lines 6 - 8 in ./lib/fhir_client/tasks/tasks.rake:

task :console, [] do |t, args|
    binding.pry
end

Try this and let me know if it works.

@arscan
Copy link
Member

arscan commented Mar 5, 2018

I installed Ruby on my Windows machine. I was able to fix this issue by changing the sh call to exec and adding ruby to the command. I was having trouble just doing binding.pry, and besides, we probably should call the same code we have in the bin directory.

See the PR listed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants