Installing Ferret locally on TextDrive

I would like to give the 0.9.0 version of Ferret a try on my
application hosted on TextDrive. I am currently running on the 0.3.2
version there.

Does anyone have any tips on installing it locally there? I know just
enough about Ruby gems to get by… but I am thinking it could be as
easy as passing a -i flag to specify the install location for ferret.
Then, the only thing I am not sure about is how to modify the ruby
require library search path.

Any tips are appreciated.

Thanks,
– Tom

http://blog.atomgiant.com
http://gifthat.com

Hi Tom,

I don’t know anything about Textdrive, but maybe this helps.

There is a ‘freeze_other_gems’ rake task at
http://nubyonrails.com/articles/2005/12/22/freeze-other-gems-to-rails-lib-directory
, that basically takes the gems you specify in line 4 of the file from
your local gem repository (on your development machine) and installs
them into lib/ of your Rails project.

You can also copy the relevant files into RAILS_ROOT/lib manually.
I have done this with Ferret 0.3.2, works like a charm and looks like
this:

RAILS_ROOT/
lib/
ferret_ext.so
ferret.rb
ferret/
analysis/
analysis.rb
document/
document.rb

hth,
Jens

On Mon, Apr 03, 2006 at 08:24:14AM -0400, Tom D. wrote:

Any tips are appreciated.
http://rubyforge.org/mailman/listinfo/ferret-talk

webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

Hi Jens,

That looks promising and I will dig in to it when I have a chance over
the next couple of days. However, looking through the comments people
have had problems running it on Windows. Also, I am not sure if I can
freeze a ferret gem that will work on both Windows and Linux. Do you
think this would be possible?

If not, i am leaning towards just tweaking my TextDrive setup to look
for gems in an additional location that is outside of my deploy
path… so I don’t have to reinstall ferret every time I upload a new
version of my application.

Tom

On 4/3/06, Jens K. [email protected] wrote:

You can also copy the relevant files into RAILS_ROOT/lib manually.
document/

version there.
– Tom
webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66


Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk


Tom D.

http://blog.atomgiant.com
http://gifthat.com

On Mon, Apr 03, 2006 at 11:05:18AM -0400, Tom D. wrote:

Hi Jens,

That looks promising and I will dig in to it when I have a chance over
the next couple of days. However, looking through the comments people
have had problems running it on Windows. Also, I am not sure if I can
freeze a ferret gem that will work on both Windows and Linux. Do you
think this would be possible?

no, I think this won’t be possible because of the compiled parts. The
Ruby-only version of ferret should work, though.

Easy solution: switch to Linux for development :wink:

If not, i am leaning towards just tweaking my TextDrive setup to look
for gems in an additional location that is outside of my deploy
path… so I don’t have to reinstall ferret every time I upload a new
version of my application.

don’t know how to configure rubygems for that, Imho a rubygems
installation only looks for gems in the location specified at
installation time.

I once had to re-install all gems after installing rubygems below
/usr/local, because it only looked for installed gems there.
I had another version of rubygems in /usr, with plenty of gems
installed, but the new rubygems did not find them.

What about installing ferret into a lib/ directory inside your home
directory, and symlinking the contents of this directory into your
RAILS_ROOT/lib/ on deploy ? Should be easy to automate with capistrano,
formerly known as switchtower.

Adding that lib dir to some Ruby library search path environment
variable could work, too.

Installing your very own rubygems into your home dir would be another
option (see http://docs.rubygems.org/read/chapter/3 , section 3.2).
That would then look for gems in the location you specified as GEM_HOME,
but nowhere else, so you’d have to install all gems that you might need
into this private gems installation.

Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66

Thanks Jens. That is a solid idea about the symlink. It also has the
added benefit of being easy to rollback if Ferret 0.9 is not stable
enough.

It may take me a few days to get around to testing this out, but I
will post the details when I am finished in case others would like to
give it a try.

Tom

On 4/3/06, Jens K. [email protected] wrote:

Ruby-only version of ferret should work, though.
installation time.


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66


Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk


Tom D.

http://blog.atomgiant.com
http://gifthat.com

Hi,

I’m having this problem myself, I notice that my Txd deployed Rails
application is not working, like my locally installed Rails application.
I froze the gem and it’s in my vendor/lib and still doesn’t work. After
reading this email:

http://forum.textdrive.com/viewtopic.php?id=7880

I’m coming to the conclusion that you can’t freeze ferret like other
gems because of the C extensions. Installing the gem also builds the C
extensions? So it’s a no go for a gem freeze for Ferret?

Am I wrong on this one?

Thanks,

Tim C.

On Thu, Apr 06, 2006 at 10:19:46PM +0200, Tim C. wrote:

gems because of the C extensions. Installing the gem also builds the C
extensions? So it’s a no go for a gem freeze for Ferret?

just copy the compiled C extension (ferret_ext.so) to your
lib dir, too. works fine for me.

Regards,
Jens


webit! Gesellschaft für neue Medien mbH www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer [email protected]
Schnorrstraße 76 Tel +49 351 46766 0
D-01069 Dresden Fax +49 351 46766 66