How do people deal with macgem overwriting MRI gem binaries?
At the moment macgem will prompt the user with this warning when trying to install nokogiri (if you have already installed it with MRI): WARNING: You are installing a new version of /usr/bin/nokogiri. This file already exists with a different shebang, possibly from a different ruby implementation or version. This operation may break the script. Do you still wish to continue? Ideally I would like to install macgem binaries in /usr/local/bin - does that mean I always have to specify --bindir when installing and uninstalling gems with MacRuby? I guess it is possible to put the --bindir option in the ~/.gemrc file, but then it will be picked up by MRI as well as MacRuby I think. How are other people dealing with this issue? Cheers, Isaac
--format-executable may help, as it should prefix everything with mac-, then. You may even want to put that in your .gemrc for the install and update commands. On Fri, Jul 1, 2011 at 04:07, isaac kearse <isaackearse@gmail.com> wrote:
At the moment macgem will prompt the user with this warning when trying to install nokogiri (if you have already installed it with MRI):
WARNING: You are installing a new version of /usr/bin/nokogiri. This file already exists with a different shebang, possibly from a different ruby implementation or version. This operation may break the script. Do you still wish to continue?
Ideally I would like to install macgem binaries in /usr/local/bin - does that mean I always have to specify --bindir when installing and uninstalling gems with MacRuby?
I guess it is possible to put the --bindir option in the ~/.gemrc file, but then it will be picked up by MRI as well as MacRuby I think.
How are other people dealing with this issue?
Cheers, Isaac _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
--format-executable doesn't seem to work. In fact its worse - it just overwrites the MRI gem binary without giving a warning at all. Thanks for the idea though. On Fri, Jul 1, 2011 at 3:12 PM, Caio Chassot <lists@caiochassot.com> wrote:
--format-executable may help, as it should prefix everything with mac-, then.
You may even want to put that in your .gemrc for the install and update commands.
On Fri, Jul 1, 2011 at 04:07, isaac kearse <isaackearse@gmail.com> wrote:
At the moment macgem will prompt the user with this warning when trying to install nokogiri (if you have already installed it with MRI):
WARNING: You are installing a new version of /usr/bin/nokogiri. This file already exists with a different shebang, possibly from a different ruby implementation or version. This operation may break the script. Do you still wish to continue?
Ideally I would like to install macgem binaries in /usr/local/bin - does that mean I always have to specify --bindir when installing and uninstalling gems with MacRuby?
I guess it is possible to put the --bindir option in the ~/.gemrc file, but then it will be picked up by MRI as well as MacRuby I think.
How are other people dealing with this issue?
Cheers, Isaac _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
On Fri, Jul 1, 2011 at 05:38, isaac kearse <isaackearse@gmail.com> wrote:
--format-executable doesn't seem to work. In fact its worse - it just overwrites the MRI gem binary without giving a warning at all. Thanks for the idea though.
Interesting. It should work: $ macirb
require 'rubygems' Gem.default_exec_format => "mac%s"
I believe you want to comment on this ticket: http://www.macruby.org/trac/ticket/574 However, I'm thinking that installing to /usr/local/bin instead only solves overwriting the commands. You still have to deal with which directory comes first in your $PATH. Personally, I use rvm to solve this problem. However, it comes with its own set of trade-offs. Mark Rada mrada@marketcircle.com On 2011-06-30, at 10:07 PM, isaac kearse wrote:
At the moment macgem will prompt the user with this warning when trying to install nokogiri (if you have already installed it with MRI):
WARNING: You are installing a new version of /usr/bin/nokogiri. This file already exists with a different shebang, possibly from a different ruby implementation or version. This operation may break the script. Do you still wish to continue?
Ideally I would like to install macgem binaries in /usr/local/bin - does that mean I always have to specify --bindir when installing and uninstalling gems with MacRuby?
I guess it is possible to put the --bindir option in the ~/.gemrc file, but then it will be picked up by MRI as well as MacRuby I think.
How are other people dealing with this issue?
Cheers, Isaac _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Thanks Mark, that is definitely what I was looking for. I think once that ticket is resolved my setup should work fine. I am happy for /usr/local/bin to be after /usr/bin in my path, because I currently use the MRI gem binaries more than the MacRuby gem binaries. Cheers, Isaac On Fri, Jul 1, 2011 at 3:15 PM, Mark Rada <mrada@marketcircle.com> wrote:
I believe you want to comment on this ticket:
http://www.macruby.org/trac/ticket/574
However, I'm thinking that installing to /usr/local/bin instead only solves overwriting the commands. You still have to deal with which directory comes first in your $PATH.
Personally, I use rvm to solve this problem. However, it comes with its own set of trade-offs.
Mark Rada mrada@marketcircle.com
On 2011-06-30, at 10:07 PM, isaac kearse wrote:
At the moment macgem will prompt the user with this warning when trying to install nokogiri (if you have already installed it with MRI):
WARNING: You are installing a new version of /usr/bin/nokogiri. This file already exists with a different shebang, possibly from a different ruby implementation or version. This operation may break the script. Do you still wish to continue?
Ideally I would like to install macgem binaries in /usr/local/bin - does that mean I always have to specify --bindir when installing and uninstalling gems with MacRuby?
I guess it is possible to put the --bindir option in the ~/.gemrc file, but then it will be picked up by MRI as well as MacRuby I think.
How are other people dealing with this issue?
Cheers, Isaac _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
participants (3)
-
Caio Chassot
-
isaac kearse
-
Mark Rada