Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Raymond Thian
Raymond Thian
7,295 Points

Couldnt "bundle" command for setting up the treebook project files

After cloning the git project files for treebook, i dont seem to be able to "BUNDLE" the files. i've tried reinstall the json gem as well, but i get this message;

Fetching gem metadata from https://rubygems.org/........... Fetching version metadata from https://rubygems.org/... Fetching dependency metadata from https://rubygems.org/.. Using rake 0.9.2.2 Using i18n 0.6.0 Using multi_json 1.3.6 Using builder 3.0.0 Using erubis 2.7.0 Using journey 1.0.4 Using rack 1.4.1 Using hike 1.2.1 Using tilt 1.3.3 Using mime-types 1.19 Using polyglot 0.3.3 Using arel 3.0.2 Using tzinfo 0.3.33 Using bcrypt-ruby 3.0.1 Using coffee-script-source 1.3.3 Installing json 1.7.3 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/usr/local/opt/ruby/bin/ruby -r ./siteconf20160321-74363-nhmw5h.rb extconf.rb

creating Makefile

make "DESTDIR=" clean

make "DESTDIR=" compiling generator.c In file included from generator.c:1: ./../fbuffer/fbuffer.h:149:9: warning: variable 'result' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (len > 0) { ^~~~~~~ ./../fbuffer/fbuffer.h:153:12: note: uninitialized use occurs here return result; ^~~~~~ ./../fbuffer/fbuffer.h:149:5: note: remove the 'if' if its condition is always true if (len > 0) { ^~~~~~~~~~~~~ ./../fbuffer/fbuffer.h:146:20: note: initialize the variable 'result' to silence this warning FBuffer *result; ^ = NULL ./../fbuffer/fbuffer.h:158:47: error: too few arguments provided to function-like macro invocation VALUE result = rb_str_new(FBUFFER_PAIR(fb)); ^ /usr/local/Cellar/ruby/2.2.2/include/ruby-2.2.0/ruby/intern.h:793: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:158:11: warning: incompatible pointer to integer conversion initializing 'VALUE' (aka 'unsigned long') with an expression of type 'VALUE (const char , long)' [-Wint-conversion] VALUE result = rb_str_new(FBUFFER_PAIR(fb)); ^ ~~~~~~~~~~ 2 warnings and 1 error generated. make: ** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/2.2.0/gems/json-1.7.3 for inspection. Results logged to /usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0/json-1.7.3/gem_make.out Using thor 0.15.4 Using orm_adapter 0.4.0 Using request_store 1.0.5 Using bundler 1.11.2 Using pg 0.14.0 Using sass 3.1.20 Using shoulda-context 1.0.0 Installing sqlite3 1.3.6 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/usr/local/opt/ruby/bin/ruby -r ./siteconf20160321-74363-f9atpp.rb extconf.rb

checking for sqlite3.h... yes checking for sqlite3_libversion_number() in -lsqlite3... yes checking for rb_proc_arity()... yes checking for sqlite3_initialize()... yes checking for sqlite3_backup_init()... yes checking for sqlite3_column_database_name()... no checking for sqlite3_enable_load_extension()... no checking for sqlite3_load_extension()... no checking for sqlite3_open_v2()... yes checking for sqlite3_prepare_v2()... yes checking for sqlite3_int64 in sqlite3.h... yes checking for sqlite3_uint64 in sqlite3.h... yes creating Makefile

make "DESTDIR=" clean

make "DESTDIR=" compiling backup.c compiling database.c compiling exception.c compiling sqlite3.c compiling statement.c statement.c:262:11: warning: implicit declaration of function 'RBIGNUM' is invalid in C99 [-Wimplicit-function-declaration] if (RBIGNUM_LEN(value) * SIZEOF_BDIGITS <= 8) { ^ ./sqlite3_ruby.h:16:24: note: expanded from macro 'RBIGNUM_LEN'

define RBIGNUM_LEN(x) RBIGNUM(x)->len

                   ^

statement.c:262:11: error: member reference type 'int' is not a pointer if (RBIGNUM_LEN(value) * SIZEOF_BDIGITS <= 8) { ^~~~~~~~~~~~~~~~~~ ./sqlite3_ruby.h:16:36: note: expanded from macro 'RBIGNUM_LEN'

define RBIGNUM_LEN(x) RBIGNUM(x)->len

                   ~~~~~~~~~~  ^

statement.c:262:32: error: use of undeclared identifier 'SIZEOF_BDIGITS' if (RBIGNUM_LEN(value) * SIZEOF_BDIGITS <= 8) { ^ 1 warning and 2 errors generated. make: *** [statement.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/2.2.0/gems/sqlite3-1.3.6 for inspection. Results logged to /usr/local/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0/sqlite3-1.3.6/gem_make.out Using state_machine 1.1.2 Using activesupport 3.2.6 Using execjs 1.4.0 Using rack-cache 1.2 Using rack-test 0.6.1 Using rack-ssl 1.3.2 Using warden 1.2.1 Using sprockets 2.1.3 Using treetop 1.4.10 An error occurred while installing json (1.7.3), and Bundler cannot continue. Make sure that gem install json -v '1.7.3' succeeds before bundling.