Long installing ri documentation for rails-4.0.2 - ruby

I'm have two machines with Ubuntu and Debian.
I installed RVM on every machines, and installed latest stable ruby. But when i'm trying make
gem install rails gem starting install all gems and stopping on "Installing ri documentation for rails-4.0.2".
What i'm doing wrong? Thank you

It is good that it installs all dependency gems first, but strange that halts. How much time the installation of ri get?
Anyway, to disable ri or rdoc installation, add the following file inside of your home folder in yaml format:
~/.gemrc
---
gem: --no-ri --no-rdoc
verbose: true
backtrace: true
NOTE: The verbose and backtrace are useful, but optional parameters.

Related

How to install Ruby ri documentation for Ruby v2.1.7

Can somebody point me to how I can install the ri documentation for v2.1.7?
I tried "How do I install the Ruby ri documentation?" with no luck.
I would prefer installing ri so that I can lookup specific methods in a class directly without opening the help file.
Also, I had no luck with the following:
C:\Users\ram\ruby>gem install rdoc-data
Fetching: rdoc-data-4.0.1.gem (100%)
rdoc-data is only required for C ruby 1.8.7 or 1.9.1.
rdoc-data is required for JRuby.
To install ri data for RDoc 4.0+ run:
rdoc-data --install
Successfully installed rdoc-data-4.0.1
Parsing documentation for rdoc-data-4.0.1
Installing ri documentation for rdoc-data-4.0.1
Done installing documentation for rdoc-data after 1 seconds
1 gem installed
C:\Users\ram\ruby>ri Array
Nothing known about Array
C:\Users\ram\ruby>rdoc-data --install
Your ruby version 2.1.7 is not supported, only 1.8.7, 1.9.2, 1.9.3, 2.0.0
It seems that for v2.1.7 something else is required.
Note this is for Windows. I want to do it natively without using VM/Cygwin, etc.
As your error message indicates, rdoc-data doesn't support ruby 2.1.7.
If you're using RVM, try:
rvm docs generate
Be patient, it takes several minutes to install the documentation.
If you want the ri documentation installed by default for all gem installations, check your gem config file ~/.gemrc to see if you have defaults set up that excludes documentation. Remove any and all of the following:
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
install: --no-document
update: --no-document
gem: --no-document
I believe gems install documentation by default. If not, add this to the gem config file
gem: --ri
Since you're on Windows, you can install Cygwin on your Windows machine and then install RVM using Cygwin. Or, you can download the rdocs source files http://ruby-doc.org/downloads/ and extract them to your Ruby docs folder /Users/userprofile/.rvm/gems/ruby-2.1.7/doc/.
I did a cursory glance, and didn't see ruby 2.1.7; it goes straight from 2.1.6 to 2.2.0. You can dump 2.1.6 in the ruby-2.1.7/doc/ folder or update your Ruby version to one that is supported.

Ruby ri file - Nothing known about File error

I tried installing a gem first gem install rdoc-data
After it successfully installed, I tried rdoc-data --install However, I get the error:
Your ruby version 2.1.1 is not supported, only 1.8.7, 1.9.2, 1.9.3, 2.0.0
Does this mean I have to downgrade to Ruby 2.0.0?
I tried running ri File to read the documentation however all I get is the message: Nothing known about File.
Did some research into older Stack Overflow posts and someone suggested running rvm docs generate however all I get is "Currently 'rvm docs ...' does not work with non-rvm rubies.
Install ri documentation first:
rvm docs generate-ri
I used
gem install rdoc-data
gem rdoc --all --ri --no-rdoc
Don't forget to open a new terminal window, then ri "test" ri "if" etc should thereafter.
These commands came from here and here

Running Jekyll on Windows 7

I'm having an issue with running Jekyll on windows 7. When I run
jekyll
I get the following error
C:\temp\jekyll\kouphax.github.com> jekyll
Configuration from C:/temp/jekyll/kouphax.github.com/_config.yml
Building site: C:/temp/jekyll/kouphax.github.com -> C:/temp/jekyll/kouphax.github.com/_site
unit-testing
You are missing a library required for Textile. Please run:
$ [sudo] gem install RedCloth
ERROR: YOUR SITE COULD NOT BE BUILT:
------------------------------------
Missing dependency: RedCloth
However RedCloth IS installed
C:\temp\jekyll\kouphax.github.com> gem install RedCloth
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed RedCloth-4.2.8
1 gem installed
Installing ri documentation for RedCloth-4.2.8...
Installing RDoc documentation for RedCloth-4.2.8...
Can anyone enlighten me?
I followed the instructions here and that fixed my problem.
After gem install RedCloth run redcloth.bat from \Ruby\bin (replace \Ruby\ with the Ruby installation dir).
If it complains about not finding the path 1.9/redcloth_scan then do the following:
Create a dir named 1.9 in \Ruby\lib\ruby\gems\1.9.1\gems\RedCloth-4.2.8\ext
Copy everything from \Ruby\lib\ruby\gems\1.9.1\gems\RedCloth-4.2.8\ext\redcloth_scan in the 1.9 folder just created.
Try uninstalling the gems and reinstalling them. RedCloth first and then Textile so that it makes sure to see RedCloth.
(I'm new to ruby, so that may not even make sense, but it seems like it's worth a shot.)
Try download and reinstall the latest ruby ,then follow this instruction, good luck!

Installing Sproutcore with RubyGems fails at the haml gem

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..

Ruby Gem package manager failing with Gem::GemNotFoundException

I haven't used Ruby for a while on my Mac. Obviously something has changed in my environment as gem is no longer working as it should.
Some info from my machine, running OSX 10.5.8:
% gem --version
0.9.0
% gem env
Rubygems Environment:
- VERSION: 0.9.0 (0.9.0)
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- GEM PATH:
- /usr/local/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org
The error I'm seeing is:
% sudo gem update --system
Password:
Updating RubyGems...
Attempting remote update of rubygems-update
ERROR: While executing gem ... (RuntimeError)
rubygems-update requires builder >= 0
Or if I try to install a new gem:
% sudo gem install bossman
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find bossman (> 0) in the repository
Some people have recommended clearing out the source_cache file, but this didn't help me. Others recommended:
% gem clean
Cleaning up installed gems...
Clean Up Complete
But that also doesn't help.
Can someone please help me get gem working again? Any insight into the reasoning behind this would be helpful. I know sufficiently little about Ruby and gem to find these error messages cryptic.
EDIT
I tried Derick Bailey's suggestion, but without any luck:
% sudo gem install rubygems-update update_rubygems
Password:
ERROR: While executing gem ... (RuntimeError)
rubygems-update requires builder >= 0
your version of rubygems should support updating, but it's obviously not working. I've been seeing this a lot recently - not just on osx, either.
the "easy" answer is to either re-install your ruby runtime with an updated version of rubygems already packaged with it, or you can install an updated version of rubygems.
for complete instructions on installing rubygems, see http://docs.rubygems.org/read/chapter/3
try running this: gem install rubygems-update update_rubygems
if that doesn't work, you'll need to manually update, which can be done with these instructions: http://docs.rubygems.org/read/chapter/3#page13
Ugh, I thought I had fixed these legacy indexes so update_rubygems worked...I guess not. The main problem here is your version of RubyGems is very old, and you'll need to update. Since you can't install gems, (none are listed in the legacy index, in an effort to get you to update) the best thing to do would be to download the .tgz/.zip from http://gemcutter.org/pages/download and run sudo ruby setup.rb.

Resources