I want to use chef-metal with on my windows workstation. Following are details of my setup :
OS : Windows 7, 32-bit
Chef client version : 11.12.0
I follow the instructions as mentioned here . I intend to use the Vagrant driver for chef-metal, so I have vagrant and virtualbox installed on my system. Next as the documentation says, I install 'chef-metal' gem, and then try to run the basic vagrant_linux and simple recipes. But the setup is giving me rubygems conflicts for gem 'ffi', the error is shown in the screenshot below :
Apparently, installing chef-metal gem is messing up my chef-client installation also. If I run chef-client -v, just to check if chef-client is working fine, i throws the same gem conflict error.
While installation of chef-metal gem, I observe that it is installing certain gems, that are already installed on the system(with the chef-client installation.) I tried to uninstalling a version of the gem throwing the error(ffi-1.9.3-x86-mingw32), but it showed me this info:
Same is the response i get when i try to uninstall ffi-1.5.0-x86-mingw32 gem.
Update :
As per Tensibai's suggestions, I removed teh older version of the gem and updated to use a new one. Following is the new gem dependency error I get :
Please help as I have reached a dead end on searching a solution for this one:
Gem documentation is HERE
To uninstall it is gem uninstall ffi -v 1.5.0
What the errors tells you is that it can't load it because ffi is in versino 1.5 and ohai require it in a version around 1.9.X (the ~> 1.9).
You best bet to resolve the problem is to run a gem update ffi -v 1.9.3
And update chef too to remove old depending: gem update chef
Related
I am new to Ruby and Gems, Bundler, RVM, etc. although I have been a programmer for many years, including the past 5+ on PHP with PhpStorm.
I want to write a Vagrant Plugin so I wanted to set up debugging with RubyMine 2016.1 for Vagrant without modifying the source code However after hours and hours of trial and error I feel like I am just running around in circles.
I installed RVM and ran rvm install 2.3.0 then rvm use 2.3.0 and then tried to install this gem:
gem install ruby-debug-base19x --pre
And it would fail with these and several other errors:
ERROR: Error installing ruby-debug-base19x:
ERROR: Failed to build gem native extension.
current directory: /Users/mikeschinkel/.rvm/gems/ruby-2.3.0/gems/ruby-debug-base19x-0.11.31/ext/ruby_debug
/Users/mikeschinkel/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160513-39119-13cpfzr.rb extconf.rb
Ignoring debase-0.2.2.beta7 because its extensions are not built. Try: gem pristine debase --version 0.2.2.beta7
So I installed RVM and ran rvm install 1.9.3 then rvm use 1.9.3 and then the following ran without error:
gem install ruby-debug-base19x --pre
gem install ruby-debug-ide --pre
Then I go to Debug and I see this pop-up:
If I select yes there is a status dialog that appears to be trying to install these:
.../ruby-debug-base19x-0.11.31.gem
.../ruby-debug-ide-0.6.1-beta2.gem
After which RubyMine displays this error:
Error running Vagrant Up:
Cannot start debugger. Gem 'ruby-debug-ide' isn't installed or its executable script 'rdebug-ide' doesn't exist
If I try to debug again it just runs me through the same popup-install-then-error loop.
BTW, here is my Run/Debug Configuration:
P.S. The Vagrant .gemspec specifies >= 2.0.0 Ruby so I am worried that even if I can get it fixed RubyMine debugging won't work with, but hopefully not:
s.required_ruby_version = ">= 2.0.0"
Thanks in advance for any help.
-Mike
I working on a Windows 7 machine with Vagrant v 1.4.1 and I have been struggling to install the vagrant-berkshelf plugin. I'm following some instructions from a blog by Mischa Taylor. I've installed VirtualBox (4.2.20), a "sane" Ruby environment (with the DevKit) and the berkshelf gem and that went fine as well but whenever I issue the
> vagrant plugin install vagrant-berkshelf
The command returns an error when trying to build the
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/ext/builder.rb:62:in `run':
ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
C:/HashiCorp/Vagrant/embedded/bin/ruby.exe extconf.rb
C:/HashiCorp/Vagrant/embedded/bin/ruby.exe: invalid option -J (-h will show valid
options) (RuntimeError)
Gem files will remain installed in C:/Users/user_me/.vagrant.d/gems/gems/hitimes-
1.2.1 for inspection.
Results logged to C:/Users/user_me/.vagrant.d/gems/gems/hitimes-1.2.1/ext/hitimes/c/gem_make.out
from
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/rubygems/ext/ext_conf_builder.rb:39:in `block in build'
if I issue
> gem install hitimes
that works fine, so the problem seems to be in the extension builder that Vagrant uses. I don't have alot of experience working with Ruby I was just wanting to start learning to use chef and berkshelf with vagrant.
This may be due to the version of Ruby
try rvm to manage your ruby environments, download ruby 1.9.3 through rvm
then
rvm use 1.9.3
vagrant plugin install vagrant-berkshelf
I am trying to setup my rails application on Windows 7 machine. I installed Ruby 1.9.3 by using installer. I also installed Rails 3.2.2.
Now, I am trying to run bundle install from my application root directory. This command used to install all the required gems. However, when I am running in this new machine its not installing. I have to install all the gems manually one by one.
I know its bit strange but I am facing this for the first time..!!
Edit 1: Please refer below screen-shot.
Note: I have already installed few gems manually before posting here. The error related to DevKit that I am getting below has just came while I was tried to install json gem..
After Installing more gems manually:
If you read the error, it tells you that you need DevKit to install that gem on Windows. So install that and follow the instructions, then try again ;) After the json gem can be installed, it should install every other gem in the Gemfile.
(The json gem is a dependency from Rails)
I tried to install the package "capistrano" on a linux box but got the following error:
*** buffer overflow detected ***: /usr/bin/ruby terminated
Additionally it showed me a list of the memory map and then the install process was aborted.
Any idea on what causes this error?
Cheers
Roland
I had similar issue when installing Capistrano on CentOs 6.7, Ruby 1.8.5, gem 1.3.1. Turns out the issue was caused by newest highline package.
The following allowed me to install capistrano correctly:
gem install highline --version "=1.6.2"
gem install capistrano --version "=2.6.0"
This error may be related to some Ruby 1.8.6 bugs (see this post http://opsrealism.tumblr.com/post/4931621276/mirroring-rubygems-and-ruby-9-2-on-centos-5-5 for some more details), so you may try to upgrade your Ruby to 1.8.7, if it's possible.
Another option is to try to install a bit older version of gem - it worked for me on a couple of occasions, where exact gem versions didn't matter. For example,
gem install capistrano --version "=2.7.0"
might work.
I'm running:
Centos 5.5
Ruby 1.8.5
Gems 1.3.1
I narrowed the problem down to the highline gem. Although I attempted to intall all of its dependencies manually (which worked), it still failed to load itself unless I followed the above advice and specified the version, 1.6.2. =(
gem install highline --version "=1.6.2"
Hopefully, I'll be migrating off of this ancient OS soon.
I had similar issues installing cap for CentOS 5.8 but it worked using the rvm installer (to upgrade to latest ruby, I used 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux])
What I d
I yum remove ruby (to get rid of 1.8.x)
I followed simple instructions at https://rvm.io/rvm/install/ for installing rvm
gem install capistrano
cap command is found!
Hope this helps someones
I am trying to install sproutcore on a windows xp vm (virtualbox), for development, using RubyGems. When gems reaches haml-3.0.25.gem it stops with the error:
gem install sproutcore -V
...
ERROR: While executing gem ... (Zlib::DataError)
invalid stored block lengths
I have tried both Ruby 1.8.7 and 1.9.2 as well as RubyGems 1.7.1 and 1.8.1.
I tried downloading haml 3.1.1 with git and installing it manually, but the rake would not install. It said something about 'lib/haml' not found. The directory did exist.
Other gems install just fine under all the combinations I tried. I even tried installing it under my host OS (Win 7 32-bit), but it gave the same error. Installing haml by itself changes the error message only slightly:
gem install haml -V
...
ERROR: While executing gem ... (Zlib::DataError)
invalid code lengths set
Zlib compresses and decompresses data streams from what I have read, so it sounds like the haml gem might be corrupt (although I doubt).
I am at my wits end and could find no helpful advice anywhere.
Special thanks to #saner for his contribution. After a lot of frustration, this is how I finally installed sproutcore on a Windows XP VM running on a Windows 7 host.
1) Download and install Ruby 1.9.2-p180 (remember to tick the option to include the bin directory in the PATH variable).
2) Download DevKit 4.5.1 and extract it.
3) Open a command prompt and cd to the extracted directory.
4) Run:
ruby dk.rb init
ruby dk.rb review
ruby dk.rb install
5) Download RubyGems 1.7.2 and run setup.rb
6) From the command prompt run
gem install haml -v 3.0.24
gem install eventmachine --pre
gem install sproutcore --pre
Thats it.
Enjoy.
I was able to install SproutCore on Ruby 1.9.2:
Install Ruby 1.9.2-p180
gem install sproutcore --pre
gem install eventmachine --pre
gem uninstall thin
gem install mongrel
I needed to remove thin because starting sc-server ended with errors, SproutCore will use mongrel instead of thin.
Update:
I didn't mention that I use RubyGems 1.7.2 and I have installed DevKit and Cygwin.
I removed all versions of SproutCore, Mongrel and Haml, then I typed:
gem install sproutcore --pre, SproutCore v1.6.0.beta.1 was installed.
eventmachine --pre, eventmachine (1.0.0.beta.3 x86-mingw32) was installed
SproutCore works with this setup, using mongrel was not necessary.
My configuration: sproutcore (1.6.0.beta.1), ruby 1.9.2p180, gem 1.7.2, thin (1.2.11 x86-mingw32), eventmachine (1.0.0.beta.3 x86-mingw32), haml (3.0.25), gcc version 4.5.0 (GCC)
I know this is a really old question, but since I just experienced the same problem, I've decided to add my insights on it.
So, it happened while I was trying to install the same set of gems on two different machines with different architectures, with different locations and respectively in different networks. I.e. - my home mac and a remote linux server.
So, one particular gem (dm-sqlite-adapter) failed installing on both machines, and I even tried it couple of times, but always with the same result:
$ gem install dm-sqlite-adapter
ERROR: While executing gem ... (Zlib::DataError)
invalid code lengths set
Then I spent few minutes browsing the network for a solution, including reading this thread.
Since I didn't find any satisfying answer and I wasn't pleased with the idea of reinstalling everything, decided to act dumb and tried gem install one more time.. And it worked. Then tried the other machine - worked like a charm.
So as a conclusion I'd just guess that the problem came from the remote repo and maybe the gem hadn't even downloaded at all (I forgot to check that prior to succeeding installing it). But as I said - it's just a guess..