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

Padrino (ruby) fails on bundle install #73

Open
spuder opened this issue Feb 8, 2018 · 2 comments
Open

Padrino (ruby) fails on bundle install #73

spuder opened this issue Feb 8, 2018 · 2 comments

Comments

@spuder
Copy link
Contributor

spuder commented Feb 8, 2018

Use ruby 2.3.0 installed using RVM on mac

$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching rake 10.3.2
Installing rake 10.3.2
Fetching i18n 0.6.9
Installing i18n 0.6.9
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/sowen/.rvm/gems/ruby-2.3.0/gems/json-1.8.1/ext/json/ext/generator
/Users/sowen/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20180207-17793-moicv3.rb extconf.rb
creating Makefile

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

current directory: /Users/sowen/.rvm/gems/ruby-2.3.0/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/sowen/.rvm/rubies/ruby-2.3.0/include/ruby-2.3.0/ruby/intern.h:797:9: note: macro 'rb_str_new' defined here
#define rb_str_new(str, len) __extension__ (    \
        ^
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));
          ^        ~~~~~~~~~~
1 warning and 1 error generated.
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/sowen/.rvm/gems/ruby-2.3.0/gems/json-1.8.1 for inspection.
Results logged to /Users/sowen/.rvm/gems/ruby-2.3.0/extensions/x86_64-darwin-17/2.3.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'` succeeds before bundling.

In Gemfile:
  padrino was resolved to 0.12.2, which depends on
    padrino-admin was resolved to 0.12.2, which depends on
      padrino-core was resolved to 0.12.2, which depends on
        padrino-support was resolved to 0.12.2, which depends on
          activesupport was resolved to 4.1.1, which depends on
            json
$ ruby --version
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin17]
@Cosaquee
Copy link

Cosaquee commented Feb 8, 2018

hi @spuder. I checked on my computer and can confirm this problem. I tried to track which dependency is causing problem. I managed to correctly run bundle install with those changes in Gemfile

gem 'json', '~> 2.1'
gem 'padrino', '~> 0.14.2'

The problem right now is the dm-types gem.

/Users/karolkozakowski/.rvm/gems/ruby-2.3.0/gems/bundler-1.16.1/lib/bundler/runtime.rb:84:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'dm-types'. (Bundler::GemRequireError)

Last release of dm-types was on: August 02, 2012 so it is possible that something is not working with newer Ruby versions.

I managed to make it run but after loading / I now have:

DEBUG -  TEMPLATE (0.0043s) /user/signin.html
EBUG -  TEMPLATE (0.0003s) /layouts/user.html
2018-02-08 08:28:40 - NoMethodError - undefined method `gsub' for {}:Hash:

I will try to debug it more at home but you can try to update gems and see if it will help.

@spuder
Copy link
Contributor Author

spuder commented Feb 10, 2018

rm Gemfile.lock
bundle install

fixed the issue for me

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

2 participants