Forum: Ferret Installing Ferret locally on TextDrive

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
22580f640e491f0920a192610d1df393?d=identicon&s=25 Tom Davies (Guest)
on 2006-04-03 14:27
(Received via mailing list)
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
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2006-04-03 15:34
(Received via mailing list)
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-...
, 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 Davies 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       kraemer@webit.de
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
22580f640e491f0920a192610d1df393?d=identicon&s=25 Tom Davies (Guest)
on 2006-04-03 17:06
(Received via mailing list)
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 Kraemer <kraemer@webit.de> 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       kraemer@webit.de
> Schnorrstraße 76                         Tel +49 351 46766  0
> D-01069 Dresden                          Fax +49 351 46766 66
> _______________________________________________
> Ferret-talk mailing list
> Ferret-talk@rubyforge.org
> http://rubyforge.org/mailman/listinfo/ferret-talk
>


--
Tom Davies

http://blog.atomgiant.com
http://gifthat.com
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2006-04-03 18:51
(Received via mailing list)
On Mon, Apr 03, 2006 at 11:05:18AM -0400, Tom Davies 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 ;-)

> 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       kraemer@webit.de
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
22580f640e491f0920a192610d1df393?d=identicon&s=25 Tom Davies (Guest)
on 2006-04-04 18:28
(Received via mailing list)
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 Kraemer <kraemer@webit.de> 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       kraemer@webit.de
> Schnorrstraße 76                         Tel +49 351 46766  0
> D-01069 Dresden                          Fax +49 351 46766 66
> _______________________________________________
> Ferret-talk mailing list
> Ferret-talk@rubyforge.org
> http://rubyforge.org/mailman/listinfo/ferret-talk
>


--
Tom Davies

http://blog.atomgiant.com
http://gifthat.com
D279279a8a604c7719cfb02ff652b598?d=identicon&s=25 Tim Case (Guest)
on 2006-04-06 22:19
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 Case
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2006-04-07 10:34
(Received via mailing list)
On Thu, Apr 06, 2006 at 10:19:46PM +0200, Tim Case 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       kraemer@webit.de
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
This topic is locked and can not be replied to.