So, I installed Rails Installer on my machine (Windows). I just tried to install a gem (nokogiri), but to no avail. In the cmd window, running gem install nokogiri just hangs, provides no status and nothing happens. Any idea what I am doing wrong?
To know what actually is happening try
gem install nokogiri -V
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
So i've been using the mechanize gem fine on my OSX machine but now when i'm trying to use it on my Win10 machine i've run into some issues. Basically it can't find the mechanize gem for some reason. C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- mechanize (LoadError)
Are you able to use other gems on your win10 machine without error?
It looks like the error is with nokogiri not with mechanize. Which version of Nokogiri do you have installed?
I would try updating your gems with gem update --system
Try to install it:
gem install nokogiri
you should run the desktop app "start command prompt with ruby" or do win+r (for run on windows) and type:
C:\Windows\System32\cmd.exe /E:ON /K C:\Ruby22-x64\bin\setrbvars.bat
once you are in there, run your command: gem install nokogiri
apt-get install ruby2.2-dev should work :-)
I have successfully installed Ruby Gems on my Mac many times. I need to configure a Windows 7 Enterprise virtual machine with Compass, Sass and Suzy.
I downloaded an installed Ruby on the Windows machine with the installer, 1.9.3. I ran gem update --system which updated Rubygems to 1.8.4.
I was able to install Sass 3.2 by running gem install sass
However, if I run gem install compass or gem install susy I get an error:
Error while excecuting gem .. (ArgumentError) marshall data too short
Any ideas? At this point, I can't install those gems.
The alternative solution..: Download gem compass from here to your ruby root folder. Then try again
gem install compass
It should install this time..Good luck
Had same issue, updating rubygems system solved it. Just use the following command
gem update --system
For those finding this question, many great tips here. Using them, I found this solution to work:
At the N: prompt in "start command line with ruby environment", I used the command rmdir /S .gem which deleted all gems. I then installed them again with gem install as directed on their respective host web pages. Hope this helps someone.
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..
I installed ruby through the windows installer yesterday.
All seemed fine.
Today, I went installing the rmagick win32 gem like so:
c:\ruby187\bin\gem install rmagick-2.7.1-x86-mswin32.gem
in the directory with the gem.
That also seemed to work fine, got the familiar
1 gem installed
Installing ...[all the ri and other docs].
But after that, I am tried:
c:\ruby187\bin\gem install --version '= 2.3.5' rails
it just returned immediately with no output. Probably doing nothing.
c:\ruby187\bin\gem list --local
the same, no output, but returns to the cmd line (no hang).
c:\ruby187\bin\gem install rails
c:\ruby187\bin\gem install --debug rails
c:\ruby187\bin\gem install --debug --version '= 2.3.5' rails
does exactly the same.
Any idea what's wrong?
I am a RoR newbie, although I already have some experience with it on linux -
but not on Windows.
Can anybody help? Really appreciated, started to get concerned now...
I've already had problems for installing rails on windows using the command gem install. The solution was executing the file cmd.exe like Administrator. This file is encountered in path C:\windows\system32 on Windows XP. Try do it.