vagrant-berkshelf plugin compilation (installation) error - ruby

enclosed a snippet of my console:
release version:
$ sudo cat /etc/*release* | grep -i distrib
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu 13.10"
ruby version:
$ ruby --version
ruby 2.0.0p299 (2013-08-29) [x86_64-linux-gnu]
vagrant version:
$ vagrant --version
Vagrant 1.3.5
prerequisites:
$ sudo dpkg -s libxml2 libxml2-dev libxslt1-dev libxslt1.1 build-essential | grep -i status
Status: install ok installed
Status: install ok installed
Status: install ok installed
Status: install ok installed
Status: install ok installed
when i try to install vagrant-berkshelf plugin, i receive the following error:
$ sudo vagrant plugin install vagrant-berkshelf --plugin-version 1.3.4
Installing the 'vagrant-berkshelf --version '1.3.4'' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/opt/vagrant/embedded/bin/ruby extconf.rb
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-linux-gnu/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... ERROR, review 'tmp/x86_64-linux-gnu/ports/libxml2/2.8.0/compile.log' to see what happened.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/opt/vagrant/embedded/bin/ruby
/home/user/.vagrant.d/gems/gems/mini_portile-0.5.2/lib/mini_portile.rb:265:in `block in execute': Failed to complete compile task (RuntimeError)
from /home/user/.vagrant.d/gems/gems/mini_portile-0.5.2/lib/mini_portile.rb:257:in `chdir'
from /home/user/.vagrant.d/gems/gems/mini_portile-0.5.2/lib/mini_portile.rb:257:in `execute'
from /home/user/.vagrant.d/gems/gems/mini_portile-0.5.2/lib/mini_portile.rb:69:in `compile'
from /home/user/.vagrant.d/gems/gems/mini_portile-0.5.2/lib/mini_portile.rb:109:in `cook'
from extconf.rb:101:in `block in <main>'
from extconf.rb:119:in `call'
from extconf.rb:119:in `block in <main>'
from extconf.rb:109:in `tap'
from extconf.rb:109:in `<main>'
Gem files will remain installed in /home/user/.vagrant.d/gems/gems/nokogiri-1.6.0 for inspection.
Results logged to /home/user/.vagrant.d/gems/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:540:in `block in build_extensions'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `each'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `build_extensions'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:180:in `install'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/action/install_gem.rb:49:in `block in call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/action/install_gem.rb:39:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/action/runner.rb:61:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/command/base.rb:17:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/command/install.rb:27:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/plugins/commands/plugin/command/root.rb:52:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/cli.rb:38:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/lib/vagrant/environment.rb:478:in `cli'
from /opt/vagrant/embedded/gems/gems/vagrant-1.3.5/bin/vagrant:96:in `<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
can someone help me solve the issue
update:
the same error holds for vagrant-berkshelf version 1.3.x, 1.2.0, and even without specifying the version explicitly.

$ NOKOGIRI_USE_SYSTEM_LIBRARIES=1 vagrant plugin install vagrant-berkshelf
Source

investigation reveals that zlib is missing, so compilation fails. executing the following should solve your problem.
sudo apt-get install zlib1g-dev lib64z1-dev
sudo vagrant plugin install vagrant-berkshelf --plugin-version 1.3.4

Related

rbenv ruby 2.7.2 installation fails: "BUILD FAILED"

I am getting this strange error while trying to install ruby 2.7.2 using rbenv.
Does anybody know what the issue is?
$ rbenv install 2.7.2
Installing ruby-2.7.2...
BUILD FAILED (Ubuntu 20.04 using ruby-build 20201005-4-g4761049)
Inspect or clean up the working tree at /tmp/ruby-build.20201106211003.49727.I05SRV
Results logged to /tmp/ruby-build.20201106211003.49727.log
Last 10 log lines:
from ./tool/rbinstall.rb:846:in `block (2 levels) in install_default_gem'
from ./tool/rbinstall.rb:279:in `open_for_install'
from ./tool/rbinstall.rb:845:in `block in install_default_gem'
from ./tool/rbinstall.rb:835:in `each'
from ./tool/rbinstall.rb:835:in `install_default_gem'
from ./tool/rbinstall.rb:799:in `block in <main>'
from ./tool/rbinstall.rb:950:in `block in <main>'
from ./tool/rbinstall.rb:947:in `each'
from ./tool/rbinstall.rb:947:in `<main>'
make: *** [uncommon.mk:373: do-install-all] Error 1
EDIT: Below is the content of the .log file (the full version is 197'000 lines long, so I can only post the last part).
And at the end, it says:
ruby-2.7.2/lib/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- openssl (LoadError)
However, I DO have openssl installed (I use it). What am I missing?
generating x86_64-linux-fake.rb
x86_64-linux-fake.rb updated
./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems -r./x86_64-linux-fake ./tool/rbinstall.rb --make="make" --dest-dir="" --extout=".ext" --mflags="" --make-flags="" --data-mode=0644 --prog-mode=0755 --installed-list .installed.list --mantype="doc" --rdoc-output=".ext/rdoc" --html-output=".ext/html"
installing binary commands: /home/tom/.rbenv/versions/2.7.2/bin
installing base libraries: /home/tom/.rbenv/versions/2.7.2/lib
installing arch files: /home/tom/.rbenv/versions/2.7.2/lib/ruby/2.7.0/x86_64-linux
installing pkgconfig data: /home/tom/.rbenv/versions/2.7.2/lib/pkgconfig
installing extension objects: /home/tom/.rbenv/versions/2.7.2/lib/ruby/2.7.0/x86_64-linux
installing extension objects: /home/tom/.rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0/x86_64-linux
installing extension objects: /home/tom/.rbenv/versions/2.7.2/lib/ruby/vendor_ruby/2.7.0/x86_64-linux
installing extension headers: /home/tom/.rbenv/versions/2.7.2/include/ruby-2.7.0/x86_64-linux
installing extension scripts: /home/tom/.rbenv/versions/2.7.2/lib/ruby/2.7.0
installing extension scripts: /home/tom/.rbenv/versions/2.7.2/lib/ruby/site_ruby/2.7.0
installing extension scripts: /home/tom/.rbenv/versions/2.7.2/lib/ruby/vendor_ruby/2.7.0
installing extension headers: /home/tom/.rbenv/versions/2.7.2/include/ruby-2.7.0/ruby
installing rdoc: /home/tom/.rbenv/versions/2.7.2/share/ri/2.7.0/system
installing html-docs: /home/tom/.rbenv/versions/2.7.2/share/doc/ruby
installing capi-docs: /home/tom/.rbenv/versions/2.7.2/share/doc/ruby
installing command scripts: /home/tom/.rbenv/versions/2.7.2/bin
installing library scripts: /home/tom/.rbenv/versions/2.7.2/lib/ruby/2.7.0
installing common headers: /home/tom/.rbenv/versions/2.7.2/include/ruby-2.7.0
installing manpages: /home/tom/.rbenv/versions/2.7.2/share/man (man1, man5)
installing default gems from lib: /home/tom/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0 (build_info, cache, doc, extensions, gems, specifications)
benchmark 0.1.0
/tmp/ruby-build.20201107153545.4938.VEdjtZ/ruby-2.7.2/lib/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- openssl (LoadError)
from /tmp/ruby-build.20201107153545.4938.VEdjtZ/ruby-2.7.2/lib/rubygems/core_ext/kernel_require.rb:92:in `require'
from /tmp/ruby-build.20201107153545.4938.VEdjtZ/ruby-2.7.2/lib/rubygems/specification.rb:2430:in `to_ruby'
from ./tool/rbinstall.rb:846:in `block (2 levels) in install_default_gem'
from ./tool/rbinstall.rb:279:in `open_for_install'
from ./tool/rbinstall.rb:845:in `block in install_default_gem'
from ./tool/rbinstall.rb:835:in `each'
from ./tool/rbinstall.rb:835:in `install_default_gem'
from ./tool/rbinstall.rb:799:in `block in <main>'
from ./tool/rbinstall.rb:950:in `block in <main>'
from ./tool/rbinstall.rb:947:in `each'
from ./tool/rbinstall.rb:947:in `<main>'
make: *** [uncommon.mk:373: do-install-all] Error 1
Long story short, I found out that libssl-dev and libreadline-dev were required, so this solved the problem:
sudo apt-get install libssl-dev libreadline-dev
In RHEL8/CENTOS8:
sudo yum install readline-devel openssl-devel
assuming you already ran:
sudo yum groupinstall "Development Tools"

vagrant-aws plugin installation error

I am trying to install the aws plugin for vagrant but getting an error. I am running vagrant 1.9 on macOS Sierra 10.12.1. I have no ruby expertise so I can use all the help you can provide.
I tried installing ruby version 2.3.3, but based on the paths below vagrant is using the embedded version.
vagrant plugin install vagrant-aws
Installing the 'vagrant-aws' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'fog-xml' (>= 0) among 45 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/opt/vagrant/embedded/gems', execute `gem env` for more information
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/specification.rb:1311:in `block in activate_dependencies'
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/specification.rb:1300:in `each'
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/specification.rb:1300:in `activate_dependencies'
from /opt/vagrant/embedded/lib/ruby/2.2.0/rubygems/specification.rb:1282:in `activate'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/bundler.rb:319:in `block in activate_solution'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/bundler.rb:316:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/bundler.rb:316:in `activate_solution'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/bundler.rb:244:in `internal_install'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/bundler.rb:97:in `install'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/plugin/manager.rb:62:in `block in install_plugin'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/plugin/manager.rb:72:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/plugin/manager.rb:72:in `install_plugin'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/action/install_gem.rb:37:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/action/runner.rb:66:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/command/base.rb:14:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/command/install.rb:32:in `block in execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/command/install.rb:31:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/command/install.rb:31:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/plugins/commands/plugin/command/root.rb:66:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/cli.rb:42:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/lib/vagrant/environment.rb:308:in `cli'
from /opt/vagrant/embedded/gems/gems/vagrant-1.9.0/bin/vagrant:123:in `<main>'
This appears to be fixed in Vagrant 1.9.1, as I also had this same issue with the vagrant-rackspace plugin, but it installs fine now.
I am having exactly the same issue on current Arch Linux. I'll also add that even if I:
vagrant plugin install fog-xml
Installing the 'fog-xml' plugin. This can take a few minutes...
Installed the plugin 'fog-xml (0.1.2)'!
Or:
`gem install fog-xml`
I get the same error condition.

Cant install Vagrant Plugin - Gem Failing

Trying to install the vagrant-digitalocean plugin for vagrant, but its having an issue install the gems required for it.
Installing the 'vagrant-digitalocean' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:562:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/opt/vagrant/embedded/bin/ruby extconf.rb
creating Makefile
make
compiling generator.c
In file included from /opt/vagrant/embedded/include/ruby-1.9.1/ruby.h:32:0,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
/opt/vagrant/embedded/include/ruby-1.9.1/ruby/ruby.h:105:14: error: size of array ‘ruby_check_sizeof_long’ is negative
/opt/vagrant/embedded/include/ruby-1.9.1/ruby/ruby.h:109:14: error: size of array ‘ruby_check_sizeof_voidp’ is negative
In file included from /opt/vagrant/embedded/include/ruby-1.9.1/ruby/intern.h:43:0,
from /opt/vagrant/embedded/include/ruby-1.9.1/ruby/ruby.h:1383,
from /opt/vagrant/embedded/include/ruby-1.9.1/ruby.h:32,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
/opt/vagrant/embedded/include/ruby-1.9.1/ruby/st.h:67:14: error: size of array ‘st_check_for_sizeof_st_index_t’ is negative
make: *** [generator.o] Error 1
Gem files will remain installed in /home/aaron/.vagrant.d/gems/gems/json-1.8.0 for inspection.
Results logged to /home/aaron/.vagrant.d/gems/gems/json-1.8.0/ext/json/ext/generator/gem_make.out
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:540:in `block in build_extensions'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `each'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:515:in `build_extensions'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/installer.rb:180:in `install'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:297:in `block in install'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `each_with_index'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/dependency_installer.rb:270:in `install'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/action/install_gem.rb:49:in `block in call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
from /opt/vagrant/embedded/lib/ruby/1.9.1/rubygems/user_interaction.rb:40:in `use_ui'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/action/install_gem.rb:39:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/warden.rb:34:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/builder.rb:116:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `block in run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/action/runner.rb:61:in `run'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/command/base.rb:17:in `action'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/command/install.rb:44:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/plugins/commands/plugin/command/root.rb:47:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/cli.rb:46:in `execute'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/lib/vagrant/environment.rb:478:in `cli'
from /opt/vagrant/embedded/gems/gems/vagrant-1.2.7/bin/vagrant:84:in `<top (required)>'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
This happened to me when I installed an i686 version of Vagrant on my Ubuntu x86_64 machine. Unfortunately, both version would install successfully but the wrong version would fail in this confusing way.
I was having issues with installing plugins with similar errors.
What fixed all the issues for me was updating to:
Vagrant 1.7.2
http://www.vagrantup.com/downloads
Ruby 2.2.0
Instructions: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you
Note: Just don't use his copy-paste instructions they are messed up, link over to the README files he has the links right above his copy-paste snippets.
This 100% fixed all my plugin install issues.
PS: Use sudo vagrant plugin install

bundle install: ERROR: Failed to build gem native extension for RedCloth, bcrypt-ruby

I am getting a bundle install error only on a single CentOS 6 VM image, but no clue why the extconf.rb is not running properly through bundler only.
I have seen this with both RedCloth and bcrypt-ruby and the gem_make.out only contains a single line:
/usr/local/rvm/rubies/ree-1.8.7-2012.02/bin/ruby extconf.rb
I was able to install RedCloth by running gem install RedCloth -v '4.2.8', but then ran into the same problem with bcrypt-ruby.
I tried running cd /usr/local/rvm/gems/ree-1.8.7-2012.02#rujoisxk/gems/bcrypt-ruby-2.1.4 && ruby ext/mri/extconf.rb and it created a Makefile successfully. I would like to know why this is happening
$ bundle install --verbose
[...SNIP...]
Fetching from: http://rubygems.org/quick/Marshal.4.8/bcrypt-ruby-2.1.4.gemspec.rz
HTTP Redirection
Fetching from: http://production.cf.rubygems.org/quick/Marshal.4.8/bcrypt-ruby-2.1.4.gemspec.rz
HTTP Success
Installing bcrypt-ruby (2.1.4) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ree-1.8.7-2012.02/bin/ruby extconf.rb
Gem files will remain installed in /usr/local/rvm/gems/ree-1.8.7-2012.02#rujoisxk/gems/bcrypt-ruby-2.1.4 for inspection.
Results logged to /usr/local/rvm/gems/ree-1.8.7-2012.02#rujoisxk/gems/bcrypt-ruby-2.1.4/ext/mri/gem_make.out
Extension: ext/mri/extconf.rb
/usr/local/rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/installer.rb:557:in `build_extensions'
/usr/local/rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/installer.rb:509:in `each'
/usr/local/rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/installer.rb:509:in `build_extensions'
/usr/local/rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems/installer.rb:180:in `install'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/source.rb:90:in `install'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/rubygems_integration.rb:82:in `preserve_paths'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/source.rb:89:in `install'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/installer.rb:106:in `install_gem_from_spec'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/rubygems_integration.rb:97:in `with_build_args'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/installer.rb:105:in `install_gem_from_spec'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/installer.rb:89:in `run'
(__FORWARDABLE__):3:in `each'
(__FORWARDABLE__):3:in `__send__'
(__FORWARDABLE__):3:in `each'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/installer.rb:88:in `run'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/installer.rb:14:in `install'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/cli.rb:230:in `install'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/vendor/thor/task.rb:27:in `send'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/vendor/thor/task.rb:27:in `run'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/vendor/thor.rb:275:in `dispatch'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/vendor/thor/base.rb:408:in `start'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/bin/bundle:14
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/bin/bundle:14
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/bin/bundle:23:in `load'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/bin/bundle:23
An error occurred while installing bcrypt-ruby (2.1.4), and Bundler cannot continue.
Make sure that `gem install bcrypt-ruby -v '2.1.4'` succeeds before bundling.
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/installer.rb:128:in `install_gem_from_spec'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/installer.rb:89:in `run'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/installer.rb:88:in `run'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/installer.rb:14:in `install'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/cli.rb:230:in `install'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/vendor/thor/task.rb:27:in `send'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/vendor/thor/task.rb:27:in `run'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/vendor/thor.rb:275:in `dispatch'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/vendor/thor/base.rb:408:in `start'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/bin/bundle:14
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/gems/bundler-1.2.0/bin/bundle:14
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/bin/bundle:23:in `load'
/usr/local/rvm/gems/ree-1.8.7-2012.02#global/bin/bundle:23

Can't install therubyracer, error

I am trying to instal therubyracer/ therubyracer-heroku to my app, cause it doesn't work in heroku server cause I don't have javascript runtime enviroment.
When I am trying to install these gems it writes:
Installing therubyracer-heroku (0.8.1.pre3) with native extensions C:/RailsInsta
ller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in
block in build_extensions': ERROR: Failed to build gem native extension. (Gem::I
nstaller::ExtensionBuildError)
C:/RailsInstaller/Ruby1.9.2/bin/ruby.exe extconf.rb
rm -rf build
mkdir -p build
cp -r scons build
mkdir -p build/scons/install
python build/scons/setup.py install --prefix=install
make: python: Command not found
make: *** [build/scons/install/bin/scons] Error 127
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/RailsInstaller/Ruby1.9.2/bin/ruby
extconf.rb:9:in `<main>': Error compiling V8 (RuntimeError)
Compiling V8
Gem files will remain installed in C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9
.1/gems/therubyracer-heroku-0.8.1.pre3 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/therubyra
cer-heroku-0.8.1.pre3/ext/v8/gem_make.out
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/insta
ller.rb:511:in `block in build_extensions'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/insta
ller.rb:486:in `each'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/insta
ller.rb:486:in `build_extensions'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/insta
ller.rb:159:in `install'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/source.rb:101:in `block in install'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/rubygems_integration.rb:78:in `preserve_paths'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/source.rb:91:in `install'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/installer.rb:58:in `block (2 levels) in run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/installer.rb:57:in `block in run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/installer.rb:49:in `run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/installer.rb:8:in `install'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/cli.rb:220:in `install'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/vendor/thor/task.rb:22:in `run'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/vendor/thor.rb:263:in `dispatch'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/lib/bundler/vendor/thor/base.rb:386:in `start'
from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.18
/bin/bundle:13:in `<top (required)>'
from C:/RailsInstaller/Ruby1.9.2/bin/bundle:19:in `load'
from C:/RailsInstaller/Ruby1.9.2/bin/bundle:19:in `<main>'
Thanks in advance
As far as I know, therubyracer(-heroku) simply does not work on Windows. But Windows has its own JavaScript engine, which execjs should be able to locate. So that should work for your development on Windows.
For serving the app on Heroku, you can add the therubyracer-heroku gem as following:
gem 'therubyracer-heroku', '~> 0.8.1.pre3', :platform => :ruby
:platform => :ruby will use it on C Ruby (MRI) or Rubinius but not Windows.
Also, see Heroku's docs for the Cedar Stack;
If you were previously using therubyracer or therubyracer-heroku, these gems are no longer required and strongly discouraged as these gems use a very large amount of memory.

Resources