title: Can not run middleman server (bundle install now work)
body: <p>I have problems with the launch of the server at middleman.
  Please help. I ask not strictly, this is a new thing for me. I use linux mint now...
  hoped that it would help me <a href="https://stackoverflow.com/questions/27553261/ruby-not-installing-json-v-1-8-1-as-part-of-bundle-error-failed-to-build-gem">at this theme on stackoverflow</a> But this not working for me... And bundle update &amp;&amp; bundle install, not work to...</p>
  
  <blockquote>
    <p>sudo apt-get install ruby-dev</p>
  </blockquote>
  
  <p>The ruby-dev package of the newest version (1: 2.3.0 + 1) has already been installed.</p>
  
  <hr>
  
  <p><strong><em>commands and console output which I used:</em></strong></p>
  
  <blockquote>
    <p>$ bundle exec middleman server</p>
  </blockquote>
  
  <pre><code>Could not find json-1.8.1 in any of the sources
  Run `bundle install` to install missing gems.
  </code></pre>
  
  <blockquote>
    <p>$ sudo bundle install</p>
  </blockquote>
  
  <pre><code>[sudo] пароль для user: 
  Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
  installing your bundle as root will break this application for all non-root
  users on this machine.
  Fetching gem metadata from http://rubygems.org/............
  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:
  /var/lib/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator
  /usr/bin/ruby2.3 -r ./siteconf20171204-6004-665r95.rb extconf.rb
  creating Makefile
  
  current directory: /var/lib/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator
  make "DESTDIR=" clean
  
  current directory: /var/lib/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator
  make "DESTDIR="
  compiling generator.c
  In file included from generator.c:1:0:
  ../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:
  ../fbuffer/fbuffer.h:175:47: error: macro "rb_str_new" requires 2 arguments, but
  only 1 given
       VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                                             ^
  ../fbuffer/fbuffer.h:175:20: warning: initialization makes integer from pointer
  without a cast [-Wint-conversion]
       VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                  ^
  Makefile:239: ошибка выполнения рецепта для цели «generator.o»
  make: *** [generator.o] Ошибка 1
  
  make failed, exit code 2
  
  Gem files will remain installed in /var/lib/gems/2.3.0/gems/json-1.8.1 for
  inspection.
  Results logged to
  /var/lib/gems/2.3.0/extensions/x86-linux/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:
    middleman was resolved to 3.3.5, which depends on
      middleman-sprockets was resolved to 3.3.7, which depends on
        middleman-core was resolved to 3.3.5, which depends on
          padrino-helpers was resolved to 0.12.3, which depends on
            padrino-support was resolved to 0.12.3, which depends on
              activesupport was resolved to 4.1.5, which depends on
                json
  </code></pre>
  
  <p><strong><em>ok... i wrote in conlose:</em></strong></p>
  
  <blockquote>
    <p>$ gem install json -v '1.8.1</p>
  </blockquote>
  
  <pre><code>ERROR:  While executing gem ... (Gem::FilePermissionError)
      You don't have write permissions for the /var/lib/gems/2.3.0 directory.
  </code></pre>
  
  <p><strong><em>ok... no problem!</em></strong></p>
  
  <blockquote>
    <p>$ sudo gem install json -v '1.8.1'</p>
  </blockquote>
  
  <pre><code>Building native extensions.  This could take a while...
  ERROR:  Error installing json:
      ERROR: Failed to build gem native extension.
  
      current directory: /var/lib/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator
  /usr/bin/ruby2.3 -r ./siteconf20171204-6068-15letpl.rb extconf.rb
  creating Makefile
  
  current directory: /var/lib/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator
  make "DESTDIR=" clean
  
  current directory: /var/lib/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator
  make "DESTDIR="
  compiling generator.c
  In file included from generator.c:1:0:
  ../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:
  ../fbuffer/fbuffer.h:175:47: error: macro "rb_str_new" requires 2 arguments, but only 1 given
       VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                                                 ^
  ../fbuffer/fbuffer.h:175:20: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
       VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                      ^
  Makefile:239: ошибка выполнения рецепта для цели «generator.o»
  make: *** [generator.o] Ошибка 1
  
  make failed, exit code 2
  
  Gem files will remain installed in /var/lib/gems/2.3.0/gems/json-1.8.1 for inspection.
  Results logged to /var/lib/gems/2.3.0/extensions/x86-linux/2.3.0/json-1.8.1/gem_make.out`enter code here`
  </code></pre>
  
  <p><strong><em>eahh...</em></strong></p>
  
  <p><strong><em>if i use command</em></strong></p>
  
  <blockquote>
    <p>$ bundle update</p>
  </blockquote>
  
  <p><strong><em>i see next:</em></strong></p>
  
  <pre><code>The dependency wdm (~&gt; 0.1.0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mswin32, x86-mingw32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mswin32 x86-mingw32`.
  The dependency tzinfo-data (&gt;= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mswin32, x86-mingw32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mswin32 x86-mingw32`.
  Fetching gem metadata from http://rubygems.org/............
  Fetching gem metadata from http://rubygems.org/.
  Resolving dependencies....
  Using i18n 0.7.0 (was 0.6.11)
  Using json 1.8.6 (was 1.8.1)
  Using minitest 5.10.3 (was 5.4.0)
  Using thread_safe 0.3.6 (was 0.3.4)
  Using tzinfo 1.2.4 (was 1.2.2)
  Using activesupport 4.1.16 (was 4.1.5)
  Using builder 3.2.3 (was 3.2.2)
  Using bundler 1.16.0
  Using hitimes 1.2.6
  Using timers 4.0.4 (was 1.1.0)
  Using celluloid 0.16.0 (was 0.15.2)
  Using chunky_png 1.3.8 (was 1.3.1)
  Using coffee-script-source 1.12.2 (was 1.7.1)
  Using execjs 2.7.0 (was 2.2.1)
  Using coffee-script 2.4.1 (was 2.3.0)
  Using multi_json 1.12.2 (was 1.10.1)
  Using sass 3.4.25 (was 3.3.14)
  Using compass-core 1.0.3 (was 1.0.0)
  Using compass-import-once 1.0.5
  Using rb-fsevent 0.10.2 (was 0.9.4)
  Using ffi 1.9.18 (was 1.9.3)
  Using rb-inotify 0.9.10 (was 0.9.5)
  Using compass 1.0.3 (was 1.0.0)
  Fetching eventmachine 1.2.5 (was 1.0.3)
  Installing eventmachine 1.2.5 (was 1.0.3) with native extensions
  Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
  
      current directory: /var/lib/gems/2.3.0/gems/eventmachine-1.2.5/ext
  /usr/bin/ruby2.3 -r ./siteconf20171204-9122-1fcu0r1.rb extconf.rb
  checking for main() in -lcrypto... no
  checking for openssl/ssl.h... no
  checking for main() in -lcrypto... no
  checking for openssl/ssl.h... no
  checking for main() in -lcrypto... no
  checking for openssl/ssl.h... no
  checking for main() in -lcrypto... no
  checking for openssl/ssl.h... no
  checking for rb_trap_immediate in ruby.h,rubysig.h... no
  checking for rb_thread_blocking_region()... no
  checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
  checking for rb_thread_fd_select()... yes
  checking for rb_fdset_t in ruby/intern.h... yes
  checking for rb_wait_for_single_fd()... yes
  checking for rb_enable_interrupt()... no
  checking for rb_time_new()... yes
  checking for inotify_init() in sys/inotify.h... yes
  checking for writev() in sys/uio.h... yes
  checking for pipe2() in unistd.h... yes
  checking for accept4() in sys/socket.h... yes
  checking for SOCK_CLOEXEC in sys/socket.h... yes
  checking for sys/event.h... no
  checking for epoll_create() in sys/epoll.h... yes
  checking for clock_gettime()... yes
  checking for CLOCK_MONOTONIC_RAW in time.h... yes
  checking for CLOCK_MONOTONIC in time.h... yes
  CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security
  creating Makefile
  
  To see why this extension failed to compile, please check the mkmf.log which can
  be found here:
  
    /var/lib/gems/2.3.0/extensions/x86-linux/2.3.0/eventmachine-1.2.5/mkmf.log
  
  current directory: /var/lib/gems/2.3.0/gems/eventmachine-1.2.5/ext
  make "DESTDIR=" clean
  
  current directory: /var/lib/gems/2.3.0/gems/eventmachine-1.2.5/ext
  make "DESTDIR="
  compiling binder.cpp
  make: g++: Команда не найдена
  Makefile:231: ошибка выполнения рецепта для цели «binder.o»
  make: *** [binder.o] Ошибка 127
  
  make failed, exit code 2
  
  Gem files will remain installed in /var/lib/gems/2.3.0/gems/eventmachine-1.2.5
  for inspection.
  Results logged to
  /var/lib/gems/2.3.0/extensions/x86-linux/2.3.0/eventmachine-1.2.5/gem_make.out
  
  An error occurred while installing eventmachine (1.2.5), and Bundler
  cannot continue.
  Make sure that `gem install eventmachine -v '1.2.5'` succeeds before
  bundling.
  
  In Gemfile:
    middleman-livereload was resolved to 3.1.1, which depends on
      em-websocket was resolved to 0.5.1, which depends on
        eventmachine
  </code></pre>
  
  <p><strong><em>or</em></strong></p>
  
  <blockquote>
    <p>$ bundle install</p>
  </blockquote>
  
  <pre><code>Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
  installing your bundle as root will break this application for all non-root
  users on this machine.
  Fetching gem metadata from http://rubygems.org/............
  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:
  /var/lib/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator
  /usr/bin/ruby2.3 -r ./siteconf20171204-9328-qz84bl.rb extconf.rb
  creating Makefile
  
  current directory: /var/lib/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator
  make "DESTDIR=" clean
  
  current directory: /var/lib/gems/2.3.0/gems/json-1.8.1/ext/json/ext/generator
  make "DESTDIR="
  compiling generator.c
  In file included from generator.c:1:0:
  ../fbuffer/fbuffer.h: In function ‘fbuffer_to_s’:
  ../fbuffer/fbuffer.h:175:47: error: macro "rb_str_new" requires 2 arguments, but
  only 1 given
       VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                                                 ^
  ../fbuffer/fbuffer.h:175:20: warning: initialization makes integer from pointer
  without a cast [-Wint-conversion]
       VALUE result = rb_str_new(FBUFFER_PAIR(fb));
                      ^
  Makefile:239: ошибка выполнения рецепта для цели «generator.o»
  make: *** [generator.o] Ошибка 1
  
  make failed, exit code 2
  
  Gem files will remain installed in /var/lib/gems/2.3.0/gems/json-1.8.1 for
  inspection.
  Results logged to
  /var/lib/gems/2.3.0/extensions/x86-linux/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:
    middleman was resolved to 3.3.5, which depends on
      middleman-sprockets was resolved to 3.3.7, which depends on
        middleman-core was resolved to 3.3.5, which depends on
          padrino-helpers was resolved to 0.12.3, which depends on
            padrino-support was resolved to 0.12.3, which depends on
              activesupport was resolved to 4.1.5, which depends on
                json
  </code></pre>
  
  <p><strong><em>some vicious circle</em></strong></p>