School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,431 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,503 people online right now. Registration is fast and FREE... Join Now!




Trying to install fastri-server

 

Trying to install fastri-server

elmohler

3 May, 2009 - 06:46 PM
Post #1

New D.I.C Head
*

Joined: 3 May, 2009
Posts: 2

Hi -

I'm new to Ruby/gems, etc. I wanted to put autocompletion on my irb. I discovered http://eigenclass.org/hiki/fastri and followed directions (or thought I did) to install the fastri gem. The problem is that I keep getting the following error when I execute fastri-server. Client/server are both on my local machine.

fastri-server
<internal:gem_prelude>:249:in `push_gem_version_on_load_path': undefined method `<=>' for nil:NilClass (NoMethodError)
from <internal:gem_prelude>:14:in `gem'
from /home/eric/.gem/ruby/1.9.1/bin/fastri-server:18:in `<main>'

If I try to run fri I also get...

fri
<internal:gem_prelude>:249:in `push_gem_version_on_load_path': undefined method `<=>' for nil:NilClass (NoMethodError)
from <internal:gem_prelude>:14:in `gem'
from /home/eric/.gem/ruby/1.9.1/bin/fri:18:in `<main>'

It seems the problem may be consistent with trying to run any gem.

I'm running Ubuntu 8.10 (intrepid)


**********************************************************
Results of some attempts to solve the problem below...
**********************************************************
which ruby
/usr/local/bin/ruby
**********************************************************
which gem
/usr/local/bin/gem
**********************************************************
ruby -v
ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]
**********************************************************
gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.2
- RUBY VERSION: 1.9.1 (2009-01-30 patchlevel 0) [i686-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.9.1
- /home/eric/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org/
**********************************************************
gem install fastri
WARNING: Installing to ~/.gem since /usr/local/lib/ruby/gems/1.9.1 and
/usr/local/bin aren't both writable.
WARNING: You don't have /home/eric/.gem/ruby/1.9.1/bin in your PATH,
gem executables will not run.

...

Successfully installed fastri-0.3.1.1
1 gem installed
Installing ri documentation for fastri-0.3.1.1...
Updating class cache with 1405 classes...
Installing RDoc documentation for fastri-0.3.1.1...

...HERE THINGS SEEM OK EXCEPT FOR THE TWO WARNINGS ABOVE

**********************************************************
gem list

*** LOCAL GEMS ***

fastri (0.3.1.1)

...THIS CONFIRMS fastri INSTALLED BUT WHEN I TRY TO RUN...

**********************************************************
fastri-server
<internal:gem_prelude>:249:in `push_gem_version_on_load_path': undefined method `<=>' for nil:NilClass (NoMethodError)
from <internal:gem_prelude>:14:in `gem'
from /home/eric/.gem/ruby/1.9.1/bin/fastri-server:18:in `<main>'
**********************************************************
My path is:

PATH=~/.gem/:~/.gem/ruby/1.9.1/bin:/usr/local/lib/ruby/gems/1.9.1:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
**********************************************************
I've gone as far as to download ruby-1.9.1-p0 then ./configure, make, make install route but at this point I'm spinning my wheels. If anyone has any ideas I'd sure love to hear. Thanks very much...

Eric

User is offlineProfile CardPM
+Quote Post


elmohler

RE: Trying To Install Fastri-server

4 May, 2009 - 02:35 PM
Post #2

New D.I.C Head
*

Joined: 3 May, 2009
Posts: 2

OK - so it seems the issue has been seen in http://redmine.ruby-lang.org/issues/show/1163. Bug #1350 is related but 1163 supersedes.

This patch was created:
gem_prelude_raise_right_error.patch (1.2 KB) Kyosuke MOROHASHI, 02/15/2009 07:54 PM

Could anyone please tell me how to do a patch?

Thanks in advance,
Eric



User is offlineProfile CardPM
+Quote Post

vikhyat

RE: Trying To Install Fastri-server

12 May, 2009 - 02:54 AM
Post #3

New D.I.C Head
*

Joined: 14 Feb, 2009
Posts: 5



Thanked: 1 times
My Contributions
If you want auto completion in irb, you don't need the fastri gem. That is meant for faster ri lookups.

You can either run this every time you start ruby or add it to your irbrc file:
CODE
require 'irb/completion'


Then, you can press Tab when you want it to complete anything. If that doesn't do anything, it means that there were more than one possible matches. To view all possible matches, you can press tab twice.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 12:43AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month