Your Ruby version is 2.3.1, but your Gemfile specified 2.1.2

Question

I use rvm in order to manage ruby versions on my Ubuntu 16.04 local machine.

I worked for a while on a new branch which finally I dodn't merge. I had some problems with Gemfile when I started but I don't remember what it was exactly.

My Gemfile starts like that:

source 'https://rubygems.org'
ruby "2.1.2"

When I try rails s I get:

Your Ruby version is 2.3.1, but your Gemfile specified 2.1.2

I tried rvm use 2.1.2 and got:

Using /home/guy/.rvm/gems/ruby-2.1.2

But still getting this message.

STEP 2

I changed Gemfile to begin with:

source 'https://rubygems.org'
ruby "2.3.1"

When I do bundle install I get:

Your Ruby version is 2.1.2, but your Gemfile specified 2.3.1

So I did rvm use 2.3.1 and then bundle install and got:

Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Resolving dependencies.....
Using rake 11.1.2
Using CFPropertyList 2.3.1
Using i18n 0.7.0
Using minitest 4.7.5
Using multi_json 1.10.1
Using thread_safe 0.3.4
Using tzinfo 0.3.43
Using builder 3.1.4
Using erubis 2.7.0
Using rack 1.5.2
Using mime-types 2.4.3
Using activerecord-deprecated_finders 1.0.3
Using arel 4.0.2
Using addressable 2.3.6
Using excon 0.45.3
Using formatador 0.2.5
Using net-ssh 2.9.2
Using mini_portile 0.5.2
Using ipaddress 0.8.0
Using inflecto 0.0.2
Using unf_ext 0.0.7.1
Using json 1.8.2
Using uuidtools 2.1.4
Using bundler 1.12.5
Using thor 0.19.1
Using hike 1.2.3
Using tilt 1.4.1
Using bcrypt 3.1.7
Using multi_xml 0.5.5
Using multipart-post 2.0.0
Using jwt 1.0.0
Using breadcrumbs_on_rails 2.3.0
Using buftok 0.2.0
Using uniform_notifier 1.9.0
Using cancan 1.6.10
Using coffee-script-source 1.7.0
Using execjs 2.0.2
Using commonjs 0.2.7
Using crass 0.2.1
Using dalli 2.7.4
Using orm_adapter 0.5.0
Using equalizer 0.0.9
Using hashie 2.1.2
Using htmlentities 4.3.2
Using http_parser.rb 0.6.0
Using httpclient 2.6.0.1
Using sass 3.2.18
Using kgio 2.9.3
Using libv8 3.16.14.3
Using naught 1.0.0
Using newrelic_rpm 3.9.5.251
Using oauth 0.4.7
Using pg 0.17.1
Using populator 1.0.0
Using signature 0.1.8
Using railroady 1.3.0
Using rails_serve_static_assets 0.0.2
Using rails_stdout_logging 0.0.3
Installing raindrops 0.12.0 with native extensions

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

    current directory: /home/guy/.rvm/gems/ruby-2.3.1/gems/raindrops-0.12.0/ext/raindrops
/home/guy/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160816-17319-1gslbxl.rb extconf.rb
checking for mmap() in sys/mman.h... yes
checking for munmap() in sys/mman.h... yes
checking for mremap() in sys/mman.h... yes
checking for getpagesize() in unistd.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_thread_io_blocking_region()... yes
checking for GCC 4+ atomic builtins... yes
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/guy/.rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0/raindrops-0.12.0/mkmf.log

current directory: /home/guy/.rvm/gems/ruby-2.3.1/gems/raindrops-0.12.0/ext/raindrops
make "DESTDIR=" clean

current directory: /home/guy/.rvm/gems/ruby-2.3.1/gems/raindrops-0.12.0/ext/raindrops
make "DESTDIR="
compiling raindrops.c
compiling linux_inet_diag.c
In file included from linux_inet_diag.c:17:0:
/home/guy/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby/backward/rubysig.h:14:2: warning: #warning rubysig.h is obsolete [-Wcpp]
 #warning rubysig.h is obsolete
  ^
linux_inet_diag.c: In function ‘rb_thread_blocking_region’:
linux_inet_diag.c:28:2: error: ‘TRAP_BEG’ undeclared (first use in this function)
  TRAP_BEG;
  ^
linux_inet_diag.c:28:2: note: each undeclared identifier is reported only once for each function it appears in
linux_inet_diag.c:30:2: error: ‘TRAP_END’ undeclared (first use in this function)
  TRAP_END;
  ^
linux_inet_diag.c: At top level:
linux_inet_diag.c:22:1: warning: ‘rb_thread_blocking_region’ defined but not used [-Wunused-function]
 rb_thread_blocking_region(
 ^
Makefile:238: recipe for target 'linux_inet_diag.o' failed
make: *** [linux_inet_diag.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/guy/.rvm/gems/ruby-2.3.1/gems/raindrops-0.12.0 for inspection.
Results logged to /home/guy/.rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0/raindrops-0.12.0/gem_make.out
Using ref 1.0.5
Using simple_oauth 0.2.0
Using sqlite3 1.3.9
Using subdomain-fu 1.0.0.beta3 from git://github.com/mbleigh/subdomain-fu.git (at master@3752799)
Using useragent 0.14.0
Using will_paginate 3.0.5
Using yui-compressor 0.12.0
Using fission 0.5.0
Using faker 1.3.0
Using i18n-js 3.0.0.rc11
Using memoizable 0.4.2
Using activesupport 4.0.13
Using sitemap_generator 5.0.4
Using rack-test 0.6.3
Using warden 1.2.3
Using mail 2.6.3
Using net-scp 1.2.1
Using nokogiri 1.6.1
Using unf 0.1.4
Using rdoc 4.1.1
Using sprockets 2.11.0
Using httparty 0.13.0
Using faraday 0.9.0
Using coffee-script 2.2.0
Using uglifier 2.5.0
Using less 2.5.0
Using omniauth 1.2.1
Using http 0.5.0
Using pusher 0.14.5
Using rails_12factor 0.0.2
An error occurred while installing raindrops (0.12.0), and Bundler cannot continue.
Make sure that `gem install raindrops -v '0.12.0'` succeeds before bundling.

STEP 3

I tried following the gem install raindrops -v '0.12.0' recommendation, and got this error:

Building native extensions. This could take a while... ERROR: Error installing raindrops: ERROR: Failed to build gem native extension.

    current directory: /home/guy/.rvm/gems/ruby-2.3.1/gems/raindrops-0.12.0/ext/raindrops
/home/guy/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20160816-17818-1jd1xst.rb extconf.rb
checking for mmap() in sys/mman.h... yes
checking for munmap() in sys/mman.h... yes
checking for mremap() in sys/mman.h... yes
checking for getpagesize() in unistd.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_thread_io_blocking_region()... yes
checking for GCC 4+ atomic builtins... yes
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

  /home/guy/.rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0/raindrops-0.12.0/mkmf.log

current directory: /home/guy/.rvm/gems/ruby-2.3.1/gems/raindrops-0.12.0/ext/raindrops
make "DESTDIR=" clean

current directory: /home/guy/.rvm/gems/ruby-2.3.1/gems/raindrops-0.12.0/ext/raindrops
make "DESTDIR="
compiling raindrops.c
compiling linux_inet_diag.c
In file included from linux_inet_diag.c:17:0:
/home/guy/.rvm/rubies/ruby-2.3.1/include/ruby-2.3.0/ruby/backward/rubysig.h:14:2: warning: #warning rubysig.h is obsolete [-Wcpp]
 #warning rubysig.h is obsolete
  ^
linux_inet_diag.c: In function ‘rb_thread_blocking_region’:
linux_inet_diag.c:28:2: error: ‘TRAP_BEG’ undeclared (first use in this function)
  TRAP_BEG;
  ^
linux_inet_diag.c:28:2: note: each undeclared identifier is reported only once for each function it appears in
linux_inet_diag.c:30:2: error: ‘TRAP_END’ undeclared (first use in this function)
  TRAP_END;
  ^
linux_inet_diag.c: At top level:
linux_inet_diag.c:22:1: warning: ‘rb_thread_blocking_region’ defined but not used [-Wunused-function]
 rb_thread_blocking_region(
 ^
Makefile:238: recipe for target 'linux_inet_diag.o' failed
make: *** [linux_inet_diag.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/guy/.rvm/gems/ruby-2.3.1/gems/raindrops-0.12.0 for inspection.
Results logged to /home/guy/.rvm/gems/ruby-2.3.1/extensions/x86_64-linux/2.3.0/raindrops-0.12.0/gem_make.out

Just to mention that this is the second try. Before it I found myself running several gem install xxx recommendations, in some point I understood that this is not the direction. Here some of them:

gem install sqlite3 -v '1.3.9'
gem install nokogiri -v '1.6.1'
gem install unicorn -v '4.7.0'
gem install therubyracer -v '0.12.1'
gem install nokogumbo -v '1.1.12'

Show source
| rubygems   | ruby-on-rails   | rvm   | gemfile   2016-08-16 18:08 0 Answers

Answers ( 0 )

◀ Go back