[ANN] fxri 0.1.0

G

gabriele renzi

martinus ha scritto:
fxri is an interface to Ruby's RI documentation. It has several nice
features:

* Search Engine with search-on-typing
* Includes Martin DeMello's excellent fxirb.
* Syntax-highlited ri output.

fxri is available via ruby gem, just type

gem install fxri

Here is a screenshot:

http://martinus.geekisp.com/rublog.cgi/Projects/fxri/fxri.html

mh.. maybe RBBR is still cooler, but this is definitely a nice app :)
maybe another nice addition to FreeRIDE?
 
M

Matt Mower

fxri is an interface to Ruby's RI documentation. It has several nice
features:

* Search Engine with search-on-typing
* Includes Martin DeMello's excellent fxirb.
* Syntax-highlited ri output.

fxri is available via ruby gem, just type

first fxirb, now fxri. Very nice indeed. Now who'll give us fxr? ;-)

Thanks again.

M
 
M

Matt Mower

fxri is an interface to Ruby's RI documentation. It has several nice
features:

* Search Engine with search-on-typing
* Includes Martin DeMello's excellent fxirb.
* Syntax-highlited ri output.

Can you tell me how to get fxri to pickup 3rd party documentation,
e.g. gems. I'd love to be able to use it for Rails documentation.

It would also be neat if there was a way to use it for the rails console.

M
 
M

Martin Ankerl

Can you tell me how to get fxri to pickup 3rd party documentation,
e.g. gems. I'd love to be able to use it for Rails documentation.

fxri uses the same source as ri, so you have to use
rdoc -r sourcedirectory
to generate the ri documentation. E.g. to generate the fxruby docs, I
have done this:

rdoc -r /usr/lib/ruby/gems/1.8/gems/fxruby-1.2.3/rdoc-sources

voila, more than 1500 new entries for fxri :)

It would also be neat if there was a way to use it for the rails console.

I have never used rails, so I cannot say how difficult this is

martinus
 
J

Joel VanderWerf

martinus said:
gem install fxri

The fxri tarball works fine. Nice work!

But I got stuck on the gem install:

I have Fox/FXRuby 1.2:
# ruby -r fox12 -e 1

And these are my versions:
# gem -v
0.8.4
# ruby -v
ruby 1.8.2 (2004-12-25) [i686-linux]

# gem install fxri
Attempting local installation of 'fxri'
Local gem file not found: fxri*.gem
Attempting remote installation of 'fxri'
Updating Gem source index for: http://gems.rubyforge.org
Install required dependency fxruby? [Yn] n
ERROR: While executing gem ... (Gem::DependencyError)
Required dependency fxruby not installed

# gem install fxri -f
Attempting local installation of 'fxri'
Local gem file not found: fxri*.gem
Attempting remote installation of 'fxri'
Updating Gem source index for: http://gems.rubyforge.org
Install required dependency fxruby? [Yn] n
ERROR: While executing gem ... (Gem::DependencyError)
Required dependency fxruby not installed

# gem install fxri
Attempting local installation of 'fxri'
Local gem file not found: fxri*.gem
Attempting remote installation of 'fxri'
Install required dependency fxruby? [Yn] Y
Select which gem to install for your platform (i686-linux)
1. fxruby 1.2.3 (mswin32)
2. fxruby 1.2.3 (ruby)
3. fxruby 1.2.2 (ruby)
4. fxruby 1.2.2 (mswin32)
5. fxruby 1.2.1 (mswin32)
6. fxruby 1.2.1 (ruby)
7. Cancel installation
ERROR: While executing gem ... (Gem::RemoteInstallationCancelled)
Installation of fxruby cancelled.

So why can't gem -f force use of the existing fox12 installation?
 
L

Laurent Julliard

gabriele said:
mh.. maybe RBBR is still cooler, but this is definitely a nice app :)
maybe another nice addition to FreeRIDE?

Definitely so. Actually I'm already working on it as I write this
message. I will soon send a patch to Martin so that it is easier for
us to integrate in FreeRIDE while preserving the fxri standalone
application.

Laurent
 
J

James Britt

Martin said:
fxri uses the same source as ri, so you have to use
rdoc -r sourcedirectory
to generate the ri documentation. E.g. to generate the fxruby docs, I
have done this:

rdoc -r /usr/lib/ruby/gems/1.8/gems/fxruby-1.2.3/rdoc-sources

voila, more than 1500 new entries for fxri :)


But, be warned: if you are not careful with what you import into ri, you
can add entries to core library ri info (if any new source doc modifies
core classes)

Also, there may be a bug related to 3rd party docs (or, more
specifically, docs that do not fit a certain structure expected by ri ).

I just installed fxri via rubygems, and saw that the ri data for my
Catapult library was available. All the entries are prefixed
Neurogami::Catapult; as I type out most of the first term, I get an
exception:

c:/ruby/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:99:in `concat': cannot
convert nil into Array (TypeError)
from c:/ruby/lib/ruby/1.8/rdoc/ri/ri_descriptions.rb:99:in
`merge_in'
from c:/ruby/lib/ruby/1.8/rdoc/ri/ri_reader.rb:56:in `get_class'
from c:/ruby/lib/ruby/1.8/rdoc/ri/ri_reader.rb:52:in `each'
from c:/ruby/lib/ruby/1.8/rdoc/ri/ri_reader.rb:52:in `get_class'
from
c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./lib/RiManager.rb:102:in
`report_class_stuff'
from
c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./lib/RiManager.rb:96:in `show'
from c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./fxri:262:in
`on_show'
from c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./fxri:270:in
`show_info'
... 10 levels...
from c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./fxri:292:in `run'
from c:/ruby/lib/ruby/gems/1.8/gems/fxri-0.1.0/./fxri:292
from c:/ruby/bin/fxri:19:in `load'
from c:/ruby/bin/fxri:19


I get essentially the same error if I run
c:\>ri Neurogami
at the command line.

But in that instance I have no reason to do that; I'd type out the full
prefix before hitting Enter.

It seems that fxri dies on exceptions percolated up from ri, and the
dynamic search-while-typing part using ri barfs midway through
Neurogami::Catapult, as nothing is defined for just that first term.

Seems that if you have docs in the name space Foo::Bar, and Foo is (I'm
guess) empty in some ri-special way, fxri breaks when it tries to call
"ri Foo".

James
 
M

Martin Ankerl

mh.. maybe RBBR is still cooler, but this is definitely a nice app :)

Oh! I am glad I did not know RBBR beforehand, otherwise I probably would
not have bothered to write fxri :)

martinus
 
D

Dude #2.5

Ruby newbyie...

Great tool, this will help me a lot!

I'm having a small issue running it with rubyw.exe though.

I can run it just fine from a console window, or just Start/Run...fxri,
but I still get a console window...any way to get around that?

I've played with FXRuby, and have programs that don't generate the
console window...

However, I get a Microsoft Visual C++ Runtime Exception (no more info)
if I start FXRI with rubyw.exe from a windows short cut, or via
Start/Run, "C:\ruby\bin\rubyw.exe fxri"

Windows XP SP2
ruby 1.8.2 (2004-12-25) [i386-mswin32]

Thanks.

-Chris
 
M

martinus

Hm, thats really strange. Somehow fxirb does not like it if no console
is available. I will have a look at this.

martinus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top