sitediff icon indicating copy to clipboard operation
sitediff copied to clipboard

Under AWS Linux 2 running "sitediff store" command throws an exception

Open cok-jreynolds opened this issue 4 years ago • 5 comments

Following the CentOS directions we assumed sitediff would also work under AWS Linux 2.

When running "sitediff store" we get the following error. $ sitediff store Reading config file: /home/ec2-user/sitediff/www/sitediff/sitediff.yaml Traceback (most recent call last): 10: from /home/ec2-user/.rvm/gems/ruby-2.7.1/bin/ruby_executable_hooks:24:in

' 9: from /home/ec2-user/.rvm/gems/ruby-2.7.1/bin/ruby_executable_hooks:24:in eval' 8: from /home/ec2-user/.rvm/gems/ruby-2.7.1/bin/sitediff:23:in
' 7: from /home/ec2-user/.rvm/gems/ruby-2.7.1/bin/sitediff:23:in load' 6: from /home/ec2-user/.rvm/gems/ruby-2.7.1/gems/sitediff-1.1.1/bin/sitediff:12:in <top (required)>' 5: from /home/ec2-user/.rvm/gems/ruby-2.7.1/gems/thor-0.20.3/lib/thor/base.rb:466:in start' 4: from /home/ec2-user/.rvm/gems/ruby-2.7.1/gems/thor-0.20.3/lib/thor.rb:387:in dispatch' 3: from /home/ec2-user/.rvm/gems/ruby-2.7.1/gems/thor-0.20.3/lib/thor/invocation.rb:126:in invoke_command' 2: from /home/ec2-user/.rvm/gems/ruby-2.7.1/gems/thor-0.20.3/lib/thor/command.rb:27:in run' 1: from /home/ec2-user/.rvm/gems/ruby-2.7.1/gems/sitediff-1.1.1/lib/sitediff/cli.rb:220:in store' /home/ec2-user/.rvm/gems/ruby-2.7.1/gems/sitediff-1.1.1/lib/sitediff/api.rb:226:in store': undefined method get_curl_opts' for #<SiteDiff::Api:0x0000000002a6b010> (NoMethodError) Running all other sitediff commands seem to work as expected.

Any suggestions? We really like the concept of this tool.

Thanks Jason

cok-jreynolds avatar Sep 22 '20 19:09 cok-jreynolds

@cok-jreynolds I am running into the same issue on my EC2 instance. Did you ever figure it out?

rlorenzo avatar Mar 24 '21 23:03 rlorenzo

As a workaround I put this method from here https://github.com/evolvingweb/sitediff/blob/491c3fb4411cceddeb3c6ff1ddfdc815e51055e0/lib/sitediff/cli.rb#L237

  def get_curl_opts(options)
    # We do want string keys here
    bool_hash = { 'true' => true, 'false' => false }
    curl_opts = UriWrapper::DEFAULT_CURL_OPTS
                .clone
                .merge(options['curl_options'] || {})
                .merge(options['curl_opts'] || {})
    curl_opts.each { |k, v| curl_opts[k] = bool_hash.fetch(v, v) }
    curl_opts
  end

And copied it here: https://github.com/evolvingweb/sitediff/blob/491c3fb4411cceddeb3c6ff1ddfdc815e51055e0/lib/sitediff/api.rb#L233

rlorenzo avatar Mar 25 '21 00:03 rlorenzo

I just ran into the same problem with sitediff store inside the official docker container.

Fitzi avatar Nov 11 '21 09:11 Fitzi

Same here, any help would be appreciated :)

nicelemming avatar Mar 29 '22 17:03 nicelemming

@nicelemming It appears that copying the get_curl_opts fixes the issue. See previous comments.

kirk-brown-ew avatar Jul 11 '22 21:07 kirk-brown-ew