Skip to content

Getting errors during setup #2

@wlsf82

Description

@wlsf82

I'm trying to set up the project to start the exercise, but I'm not able to run bin/setup.

When using Ruby 2.2.1, I get the following error:

Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using RVM are available at rvm.io/packages/openssl.

And when using Ruby 2.5.3 or 2.6.0, I get the following error:

Fetching gem metadata from https://rubygems.org/........
Using rake 10.3.2
Using i18n 0.6.11
Fetching json 1.8.1
Installing json 1.8.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/walmyrlimaesilvafilho/.rvm/gems/ruby-2.5.3/gems/json-1.8.1/ext/json/ext/generator
/Users/walmyrlimaesilvafilho/.rvm/rubies/ruby-2.5.3/bin/ruby -r ./siteconf20190501-48569-9tckx8.rb extconf.rb
creating Makefile

current directory: /Users/walmyrlimaesilvafilho/.rvm/gems/ruby-2.5.3/gems/json-1.8.1/ext/json/ext/generator
make "DESTDIR=" clean

current directory: /Users/walmyrlimaesilvafilho/.rvm/gems/ruby-2.5.3/gems/json-1.8.1/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
./../fbuffer/fbuffer.h:175:47: error: too few arguments provided to function-like macro invocation
    VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                                              ^
/Users/walmyrlimaesilvafilho/.rvm/rubies/ruby-2.5.3/include/ruby-2.5.0/ruby/intern.h:773:9: note: macro 'rb_str_new' defined here
#define rb_str_new(str, len) RB_GNUC_EXTENSION_BLOCK(   \
        ^
In file included from generator.c:1:
./../fbuffer/fbuffer.h:175:11: warning: incompatible pointer to integer conversion initializing 'VALUE' (aka 'unsigned long') with an expression of type 'VALUE (const char *, long)' (aka 'unsigned long (const char *, long)') [-Wint-conversion]
    VALUE result = rb_str_new(FBUFFER_PAIR(fb));
          ^        ~~~~~~~~~~
generator.c:840:25: error: use of undeclared identifier 'rb_cFixnum'
    } else if (klass == rb_cFixnum) {
                        ^
generator.c:842:25: error: use of undeclared identifier 'rb_cBignum'
    } else if (klass == rb_cBignum) {
                        ^
1 warning and 3 errors generated.
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/walmyrlimaesilvafilho/.rvm/gems/ruby-2.5.3/gems/json-1.8.1 for inspection.
Results logged to /Users/walmyrlimaesilvafilho/.rvm/gems/ruby-2.5.3/extensions/x86_64-darwin-18/2.5.0/json-1.8.1/gem_make.out

An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1' --source 'https://rubygems.org/'` succeeds before bundling.

In Gemfile:
  activerecord was resolved to 4.1.6, which depends on
    activemodel was resolved to 4.1.6, which depends on
      activesupport was resolved to 4.1.6, which depends on
        json

Can you help me with that, please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions