Re: [homebrew] Install location override for ruby-odbc
- From:
- Max Howell
- Date:
- 2009-12-15 @ 11:54
> This runs successfully. However it installs ruby-odbc within the
> folders of the current ruby installation
Yeah sucks eh? The problem is we don't currently know any solution except:
Symlink the tmbundle into /Library/Ruby/1.8/Site something or other.
The reason for this is the bundle is a plugin and Ruby has to be able
to find its plugins at runtime. The usual way for such things is a
hardcoded path.
If you look deeper you may find there is an environment variable you
can also set to add paths that ruby searches.
So the final solution would be, don't run make install, install the
tmbundle manually into the keg (eg. prefix.install
'rubyodbc.tmbundle'), and then list what the user must do next in the
Formula.caveats reimplementation.
There are several instances on OS X where it would be nice to have a
facility where Homebrew can manage files outside its prefix. We should
write them down somewhere and see what we can come up with.
Max
--
Freelance mobile, desktop and web developer
http://www.methylblue.com/
Re: [homebrew] Install location override for ruby-odbc
- From:
- Joel Chippindale
- Date:
- 2009-12-16 @ 08:57
Cheers for the suggestions.
I opted for customizing the install to put ruby-odbc in homebrew and
adding a caveat explaining how to update your environment to tell ruby
where to look for the library (see
http://github.com/mocoso/homebrew/commit/02c801c7dd29275b5096ef5ae4a4abcf99fff8c0).
J.
2009/12/15 Max Howell <max@methylblue.com>:
>> This runs successfully. However it installs ruby-odbc within the
>> folders of the current ruby installation
>
> Yeah sucks eh? The problem is we don't currently know any solution except:
>
> Symlink the tmbundle into /Library/Ruby/1.8/Site something or other.
>
> The reason for this is the bundle is a plugin and Ruby has to be able
> to find its plugins at runtime. The usual way for such things is a
> hardcoded path.
>
> If you look deeper you may find there is an environment variable you
> can also set to add paths that ruby searches.
>
> So the final solution would be, don't run make install, install the
> tmbundle manually into the keg (eg. prefix.install
> 'rubyodbc.tmbundle'), and then list what the user must do next in the
> Formula.caveats reimplementation.
>
> There are several instances on OS X where it would be nice to have a
> facility where Homebrew can manage files outside its prefix. We should
> write them down somewhere and see what we can come up with.
>
> Max
> --
> Freelance mobile, desktop and web developer
> http://www.methylblue.com/
>